Dear Bugs people,
I'm attempting to model the spatio-temporal effects of the number of fall
related injuries in two areas of the state of Connecticut in the U.S. One
is a quasi-control area and the other a quasi-treatment area. The type of
area is the effect of main interest in the analysis. We have been
conducting an educational based intervention in the treatment area for 6
years and want to see if that has a significant association with the rate
of falls-related injury as compared to the other, usual care area.
I'm emulating the text by Bannerjee, Carlin and Gelfand, 2004 Chapter 5,
Section 4, using a Poisson-lognormal model. In Chapter 8 of the same book
they recommend modeling spatio-temporal effects by nesting the spatial
effect within time.
Does anyone have sample code where a spatial normal CAR variable is nested
within the repeated temporal measurements and a corresponding data
structure they're willing to show me? I'm having trouble compiling and I
believe it's due to some details of the nested structure that I'm not
understanding.
I've written the following model, which is syntactically correct, the data
loads successfully, but compiling crashes and the NIL screen comes up. I've
followed the advice of Bannerjee, Carlin and Gelfand (2004) for values of
the prior distributions but don't know how to move forward.
Any advice or direction would be greatly appreciated. Here is the model if
anyone's willing to take offer advice or direction.
model{
for(j in 1 : N) {
for(k in 1 : T) {
f[j,k] ~ dpois(mu[j,k])
log(mu[j,k]) <- log(E[j,k]) + alpha0
+
alpha.treatment*treatment[j]
+
alpha.sex*sex[j]
+
alpha.age*(age[j] - age.bar)
+
(theta[j,k] - theta.bar)
+
(phi[zcta[j,k]] - phi.bar)
theta[j,k] ~ dnorm(0.0, tau.theta)
xi[j,k] <- (theta[j,k] - theta.bar)+
(phi[zcta[j,k]] - phi.bar)
}
}
phi[1:113] ~ car.normal(nbr[],
wts[],nnbr[],tau.phi)
# covariate means:
age.bar <- mean(age[])
theta.bar <- mean(theta[,])
phi.bar <- mean(phi[zcta[,]])
# priors:
alpha0 ~ dnorm(0.0,1.0E-4)
alpha.treatment ~ dnorm(0.0,1.0E-4)
alpha.sex ~ dnorm(0.0,1.0E-4);
alpha.age ~ dnorm(0.0,1.0E-4)
tau.theta ~ dgamma(1.0E-4, 0.000100)
tau.phi ~ dgamma(1.0E-4, 0.000050)
sd.theta <- sd(theta[,]) # marginal SD of heterogeneity
effects
sd.phi <- sd(phi[zcta[,]]) # marginal SD of
clustering effects
alpha <- sd.phi / (sd.theta + sd.phi)
}
Terrence E. Murphy, Ph.D.
Program on Aging
Yale University
1 Church St., 7th Floor
New Haven, CT 06437
[log in to unmask]
phone: 203-764-9805
fax: 203-764-9831
-------------------------------------------------------------------
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
|