Print

Print


Hello,

Thank you Simon Bonner (see response below), Antonia Turkman, Andre Millard,
and Adam Butler for your responses.  I've implemented the second loop to
loop through the two design types outside of the loop that looped through
the 7 different study results and the model compiles.  I sincerely
appreciate everyone's quick responses and clear solutions.  

Thank you!
Teresa

Teresa Nelson, M.S.
Principal Statistician
Princeton Reimbursement Group
9801 Dupont Avenue South - Suite 295
Minneapolis, MN 55431
Phone:  (952) 345-6413
Fax:      (715) 755-2767
e-mail:   [log in to unmask]

-----Original Message-----
From: Simon Bonner [mailto:[log in to unmask]] 
Sent: Tuesday, March 28, 2006 7:23 AM
To: Teresa Nelson
Subject: Re: [BUGS] I think this may be inappropriate for this list,

Hi Teresa,

Your model starts with a loop from 1:Nstudy. Inside this loop you have:
muRT[DesignRT[i]] ~ dnorm(munotRT,taunotRT)
The loop will be executed 7 times, but there are only two values of
DesignRT[i]. The first time it encounters DesignRT[i]=2, it will define
a new node:
muRT[2] ~ dnorm(munotRT,taunotRT)
But then it will encounter DesignRT[i]=2 again, when the next
non-randomized study is encountered. It will try to define muRT[2], but
this is already defined. WinBUGS doesn't like that.

You'll have to get around this by moving the line muRT[DesignRT[i]] ~
dnorm(munotRT,
taunotRT) outside of the loop. With only two types of design, you can
just add the lines:
muRT[1] ~ dnorm(munotRT,taunotRT)
muRT[2] ~ dnorm(munotRT,taunotRT)
to the code outside of the loop (i.e just above tauRT[1] <- ...). If you
had more design types you could use another loop.

Hope that helps.

Simon

On Mon, 2006-03-27 at 15:57 -0600, Teresa Nelson wrote:
> 
> 
> munotRT ~ dnorm(0, 0001)
-- 
Simon Bonner
PhD Student
Department of Statistics and Actuarial Science
Simon Fraser University, Burnaby BC, Canada



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 3/26/2006

-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]

To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.

To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list