Hi,
I have a multivarate negative binomial which i built up in STATA. I am
now trying to fit it in Winbugs (because eventually i wan't to take
spatial correlation into account with a CAR prior for my spatial random
effects) by fitting a poisson overdispersed model. I have used my MLE
estimates from STATA as starting values and found that the chain is
mixing well and convergence looks like it is not too much of an issue.
However my parameter estimates in Winbugs are VERY different from those
in STATA. I suspect it is because I am not fitting EXACTLY the same
model in STATA and in Winbugs since a negative binomial effectively
assumes a gamma prior for the overdispersion random effect whereas as
you can see from my code I am assuming a normal prior for the
overdispersion random effect u1. I tried specifying a Gamma prior for
u1, (dgamma(tau1, tau1)) and when i get to the updating stage i get a
funny error message saying "cannot bracket slice for node u1(219)" and i
really don't see what the problem is with obs 219, it's just like all
the other ones...
Am i wongly specifying the gamma prior for the random effect? Any
suggestions greatly appreciated!
Thanks,
Sandra
model
{
for(i in 1:441) {
nopos[i]~dpois(mu[i])
log(mu[i])<-offs[i]+alpha+beta1*lst[i]+beta2*dtrw[i]+beta3*pres[i]+beta4*prew[i]+beta5*tmps[i]+u1[i]
u1[i]~dnorm(0.0, tau1)
}
alpha~dflat()
beta1~dflat()
beta2~dflat()
beta3~dflat()
beta4~dflat()
beta5~dflat()
tau1~dgamma(0.001, 0.001)
sigma1<-1/sqrt(tau1)
}
-------------------------------------------------------------------
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
|