程序代码如下所示,为什么赋初值时出错,显示this chain contains uninitialized variables
model {
for (i in 1:n){
Y[i]~dnorm(s[i],tauC)
s[i]<-theta[1]/(1+theta[2]*exp(-theta[3]*t[i]))}
theta[1]~dnorm(mu[1],tau[1])
theta[2]~dnorm(mu[2],tau[2])
theta[3]~dnorm(mu[3],tau[3])
tauC~dgamma(0.001,0.001)
sigmaC<-1/sqrt(tauC)
for (k in 1:3) {
mu[k]~dnorm(0,0.000001)
tau[k]~dgamma(0.001,0.001)}
}
list(t=7)
t[] Y[]
1 2
2 5
3 10
4 20
5 30
6 40
7 44
END
INITS
list(theta1=1,theta2=1,theta3=1,tauc=1)


雷达卡





京公网安备 11010802022788号







