Dear WinBUGS user,
I would like to model the following: X[2], ..., X[5] are such that
X[k+1]=X[k]+Binomial(X[k],p). The unknown parameters are X[1] and p,
with X[2]=X[1]+Binomial(X[1],p). In WinBUGS code, I write:
model{
for(k in 1:4)
{
bin[k]<- X[k+1]-X[k]
bin[k]~dbin(p,X[k])
}
p~dunif(0,1)
X[1]~dpois(100)
}
list(X=c(NA, 151,261,450,763))
I am facing the error message "multiple definitions of node bin[1] ".
When I change (k in 1:4) into (k in 2:4), then I do not have the error
message anymore. But then, I am not dealing with the model I want since
I do not specify that X[2]=X[1]+dbin(X[1],p).
Is it possible to fix this error, or should I implement the MCMC scheme
without WinBUGS ?
I would greatly appreciate any insight.
Kind regards,
Nadia
--------------------------
Nadia Lalam
EURANDOM
P.O. Box 513
5600 MB Eindhoven
The Netherlands
-------------------------------------------------------------------
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
|