我给了所有随机节点的初始值,但 WinBUGS 仍然给我这样的信息
此初始值不对应于随机节点
我在这里缺少什么节点?
#Model
model
{
for( i in 1 :N) {
Y[i] ~ dnorm(mu[i], tau)
Z[i] ~ dnorm(mu[i], tau)
mu[i] <- theta[1] + theta[2]* exp(-exp(-theta[3]*(x[i]-theta[4])))
}
theta[1]<-1.8
theta[2] ~ dnorm(0,0.01)
theta[3] ~ dnorm(0,0.01)
theta[4] ~ dnorm(0,0.01)
tau ~ dgamma(0.001, 0.001)
sigma <- 1 / sqrt(tau)
}
#Data
list(x=c(1971,1976,1981,1986,1991,1996,2001,2006,2011,2016,2021,2026,2031,2036,2041,2046,2051,2056,2061),
Y=c(5.2,4.7,4.5,4.2,3.6,3.4,3.1,2.8,2.4,2.3,NA,NA,NA,NA,NA,NA,NA,NA,NA), N=19)
#Initial values
list(theta=c(0,0,0), tau=1)