i'm relatively new to WinBUGS......
i'm running a space time model of relative risk (Bernardinelli et al
1995) in WinBUGS with 600 regions over 6 years. the model includes one
covariate specified as 3 dummy (0/1) variables. the code follows this
message.
the model runs successfully using one chain. However, when we try to
run 2 chains we get an error message - GLM1. both sets of initial
values work fine when run as single chains..
comments/suggestions appreciated..
inits1
list(alpha=0, alpha2=0, alpha3=0, alpha4=0, beta=0, v.spat=1,
v.ind=1,v.delta=1)
inits2
list(alpha=-0.02, alpha2=-0.13, alpha3=-0.19, alpha4=-0.24,
beta=0.0006, v.spat=5 v.ind=17,v.delta=100)
model....
model
{
for (i in 1:N)
{
for (k in 1:T)
{
# Poisson likelihood for observed counts
O[i,k]~dpois(mu[i,k])
log(mu[i,k])<-log(E[i,k])+alpha+b.spat[i]+b.ind[i]+beta*t[k]+delta[i]*t[k]
+alpha2*seifa2[i]+alpha3*seifa3[i]+alpha4*seifa4[i]
# Relative Risk in each area and period of time
RR[i,k]<-exp(alpha+b.spat[i]+b.ind[i]+beta*t[k]+delta[i]*t[k]+alpha2*seifa2[i]+alpha3*seifa3[i]+alpha4*seifa4[i])
}
TT[i]<-exp(beta+delta[i]+alpha2*seifa2[i]+alpha3*seifa3[i]+alpha4*seifa4[i])
# TT is Posterior temporal trend
}
# CAR prior distribution for spatial correlated random effects:
b.spat[1:N]~car.normal(adj[],weights[],num[],v.spat)
delta[1:N]~car.normal(adj[],weights[],num[],v.delta)
# Normal prior distribution for uncorrelated random effects
for(i in 1:N)
{
b.ind[i]~dnorm(0,v.ind)
}
# Weights
for(k in 1:sumNumNeig)
{
weights[k]<-1
}
alpha~dflat()
# Hyperprior distributions on inverse variance parameter:
beta~dnorm(0,1.0E-5)
alpha2 ~ dnorm(0.0, 1.0E-5)
alpha3 ~ dnorm(0.0, 1.0E-5)
alpha4 ~ dnorm(0.0, 1.0E-5)
v.ind~dgamma(0.5,0.0005) # prior on precision for individual
random effects
v.spat~ dgamma(0.5, 0.0005) # prior on precision for spatial random
effects
v.delta~dgamma(0.5,0.0005) # prior on precision for time random
effects
sigma.ind<- sqrt(1/v.ind) # standard deviation
sigma.spat <- sqrt(1/v.spat) # standard deviation
sigma.delta <- sqrt(1/v.delta) # standard deviation
# alpha is overall rate, b.spat and b.indv are area random effects,
beta is linear trend term in time, delta is interaction random effect
between space and time.
}
Dr Geoff Morgan
Epidemiologist
Northern Rivers University Department of Rural Health - University of
Sydney
Northern Rivers Area Health Service
CONTACT DETAILS
PO Box 3074 Lismore
NSW Australia 2480
ph: 02 6620 7526
fax: 02 6620 7270
mobile: 0417 288 692
[log in to unmask]
www.nrudrh.edu.au
-------------------------------------------------------------------
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
|