hi everyone
when i run the bym model in openbugs , i encounter this error when i select the load inits option , please help me…
model
{
for (i in 1:m)
{
# Poisson likelihood for observed counts
y[i]~dpois(mu[i])
log(mu[i])<-log(e[i])+alpha+u[i]+v[i]
# Relative Risk
theta[i]<-exp(alpha+u[i]+v[i])
# Posterior probability of RR[i]>1
PP[i]<-step(theta[i]-1+eps)
# Prior distribution for the uncorrelated heterogeneity
v[i]~dnorm(0,tau.v)
}
eps<-1.0E-6
CAR prior distribution for spatial correlated heterogeneity
u[1:m]~car.normal(adj,weights,num,tau.u)
Weights
for(k in 1:sumNumNeig)
{
weights[k]<-1
}
Improper prior distribution for the mean relative risk in the study region
alpha~dflat()
mean<-exp(alpha)
Hyperprior distributions on inverse variance parameter of random effects
tau.u~dgamma(0.5,0.0005)
tau.v~dgamma(0.5,0.0005)
}
DATA
list(
m=31,
y=c(
10409.8269117541,2737.1292373599,24957.9591891116,13998.2380965686,1256.17182368015,1293.27243042939,48435.9826672945,34331.4297983092,2070.97046098664,22183.3700894722,5119.92485088089,6580.49684634386,2245.29584816213,429.221640762344,9981.98564639054,7502.35444873093,730.470001258324,47004.1743992548,1013.02406730848,27146.2288385626,492.552417067144,3496.10671701166,4924.77298154357,3581.37404194668,22391.8724559699,1649.86223378915,790.446982813124,2718.94556683406,181000.012347399,1519.42446079957,10409.8269117541
),
e=c(
17321.9248849104,7698.48335018412,26894.5394722165,18711.4571620602,5485.711953425,5278.07487729349,35477.7715443084,30460.5221195397,7512.77382880249,21671.2272572983,10526.1258719295,11727.4747497258,7286.75134138071,3233.35850911738,16403.835034883,13053.2484446028,4472.71514848016,36711.4495092359,5127.73056600846,23350.76550214,3364.64271511984,9572.38968930865,10165.2770350456,9508.63110703594,25060.3276296392,6809.0679948296,4584.4332287058,9033.64653645404,94384.7417673621,6401.27170098129,17321.9248849104
),
num = c(
4,3,3,3,3,4,9,6,6,4,3,6,4,3,5,4,6,3,3,5,5,4,7,7,6,4,8,3,5,4,7
),
adj = c(
24,9,25,29,
3,31,10,
4,31,2,
22,31,3,
8,21,20,
21,20,23,7,
26,27,17,30,8,21,6,23,24,
13,15,30,7,21,5,
12,24,1,25,10,31,
25,9,31,2,
19,27,25,
23,24,9,31,22,16,
28,15,8,5,
20,23,16,
8,13,28,17,30,
14,23,12,22,
28,15,30,7,27,18,
17,27,19,
18,27,11,
5,21,6,23,14,
5,8,7,6,20,
16,12,31,4,
14,20,6,7,24,12,16,
23,7,26,29,1,9,12,
10,9,1,29,27,11,
29,24,7,27,
7,17,18,19,11,25,26,29,
13,17,15,
26,27,25,1,24,
8,15,17,7,
22,12,9,10,2,3,4
),
sumNumNeig=147)
INITS
list(tau.v=1, tau.u=1,alpha=0,
u=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
v=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
error for node u[1] of type SpatialCARNormal.Node first argument Graph 18