I am running a zero-inflated binomial model ( this is actually exactly the same the
mixture model in Winbugs example archive):
model
{
for (i in 1 : N) {
y[i] ~ dbin(P[state1[i]], t[i])
state[i] ~ dbern(theta)
state1[i] <- state[i] + 1
t[i] <- x[i] + y[i]
prop[i] <- P[state1[i]]
}
P[1] <- p
P[2] <- 0
logit(p) <- alpha
alpha ~ dnorm(0,1.0E-4)
beta <- exp(alpha)
logit(theta) <- delta
delta ~ dnorm(0, 1.0E-4)
}
But I always got the error saying
"value of bernoulli state[1] must be an integer".
If I used the data in the example, it works. The code just does not work for my data. The
code also works for JAGS.
Does anyone know why? Thanks!
-------------------------------------------------------------------
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
|