l****a 发帖数: 336 | 1 模型通过, data load不上去, 总是提示"Expected variable name". 我查了code, 没
看到未定义参数阿。
跪求大侠指点问题在哪儿?
model{
#specify model
for(i in 1:n){
y[i] ~ dnorm(mu[i], 1) #likelihood
mu[i] <- inprod(wPrime[i,], eta[ ]) #process model
}
#prior distribution of coefficients
for(k in 1:R){
eta[k] ~ dnorm(0, 1)}
} # end of model
#data
list(
R=3, n=5,
y=c(0.8295724, 1.0092876, 0.6525292, 0.6990704, 0.3756401),
wPrime = structure(
.Data = c(
0.140766161, 0.40270746, 0.6145358,
0.140754476, 0.40209907, 0.6038612,
-0.195987523, -0.35495559, -0.3300533,
-0.167161032, -0.32665186, -0.3207835,
0.002775778, -0.08861806, -0.2060238),
.Dim = c(5,3)
)
) |
|