Dear WinBUGS-users,
I would be very grateful if someone could give me any advice on the
following hierarchical model.
Basically, I want to construct a hierarchical model, in which the
intercept for each data point has a group-specific component and a
time-specific component, and so does the slope for each data point.
The model is as follows.
model {
for (i in 1:N) {
y[i] ~ dnorm(mu[i], tauC)
mu[i]<-alpha[time[i],1]+beta[group[i], 1]+alpha[time[i],
2]*x[i]+beta[group[i], 2]*x[i]
}
for (t in 1:ntimes) {alpha[t, 1:2] ~ dmnorm(mu.alpha[], RA[,]) }
for (j in 1:ngroups) {beta[j, 1:2] ~ dmnorm(mu.beta[], RB[, ]) }
mu.alpha[1:2] ~ dmnorm(meanA[], precA[,])
mu.beta[1:2] ~ dmnorm(meanB[], precB[, ])
RA[1:2, 1:2] ~ dwish(OmegaA[, ], 4)
RB[1:2, 1:2] ~ dwish(OmegaB[, ], 4)
tauC ~ dgamma(0.0001, 0.0001)
sigma<-1/sqrt(tauC)
varcovtime[1:2, 1:2]<-inverse(RA[,])
varcovgroup[1:2, 1:2]<-inverse(RB[,])
}
However, the chains for "mu.alpha" and "mu.beta" have very high
autocorrelations and do not converge well. I am not sure if I make any
mistakes. I sincerely appreicate your help.
Weijie.
-------------------------------------------------------------------
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
|