Dear Bugs users,
I was thinking that I was trapped in missing values. I was trying to
estimate a multilevel logistic model with missing values on both of
dependent and independent variables. I was looking through the bugs
manual and getting no idea on how to deal with missing values on
independent variables except recoding them as zero. Are there any other
way to deal with this situation? Another question that I have was that
when I recoded all missing values on independent variables as zeros and
loaded the initials that worked well before, an error message has
appeared: the chain contains uninitialized variables! Could any one
tell me the reason? Any help will be highly appreciated!
Best regards
Tianji Cai
My bugs code as follows,
model
{ for( i in 1 : 200 ) {
mu[i] ~ dnorm (0,tau) for( j in 1 : 10 ) {
y[i,j] ~ dbin(k[i,j],1)
logit(k[i,j]) <-beta0+beta1*x1[i,j]+ beta2*x2[i,j]+ beta3*x3[i,j]+mu[i]
}
}
beta0 ~ dnorm(0,1.0E-6)
beta1 ~ dnorm(0,1.0E-6)
beta2 ~ dnorm(0,1.0E-6)
beta3 ~ dnorm(0,1.0E-6)
tau~ dgamma(0.001,0.001)
sigma <- 1 / sqrt(tau)
}
-------------------------------------------------------------------
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
|