I am trying to run this WinBUGS code to get a prediction for the number of fatalities in 1975
model
{
for (i in 1:5) {
fatal[i] ~ dpois(mu[i])
log( mu[i] ) <- alpha + beta * (year[i]-1970) + log( pop[i] )
}
alpha ~ dnorm(0,10000)
beta ~ dnorm(0,10000)
}
list(alpha=74.4, beta=-0.03)
year[] fatal[] pop[]
1971 3798 124.07
1972 3590 126.63
1973 3422 130.67
1974 3679 133.03
1975 NA 245
END
I thought I would be able to use load inits for alpha and beta and gen inits for the missing value for fatal[5]. When I tried this a new window pops up with Trap, undefined real result and a long list of codes etc which I haven't included as they run to about 4 pages. I am hoping a more experienced user may be able to let me know what the problem is from the information I have included. I can include the long error message if it would help.