在运行以下程序时,到gen inits是进行不下去,出现error for node y[1,1] of type Graphmultinom.Node node invalid integer value given.
model
{
for( i in 1 : N )
{
y[i, 1:4] ~ dmulti( theta[i,1:4], 4) # likelihood
theta[i, 1:4] ~ ddirch(alpha[1:4]) # prior
}
# Prior distributions of the model parameters
}
list(
alpha = c(1, 1, 1,1),
N=2,
y=structure(
.Data=c(1,2,3,4,5,6,7,8),
.Dim=c(2,4)
)
)
请大神赐教