I've discovered an error in the WinBUGS code for the regression. Please use this code:
for (i in 1:n.obs) {
y[i] ~ dnorm(mu[i], 0.001)
mu[i] <- beta0 + beta1*x[i]
}
beta0 ~ dnorm(0, 0.001)
beta1 ~ dnorm(0, 0.001)

Leave a comment