Hi, I am a new WinBUGS user trying to implement a simple multiple linear
regression model while I am learning to use the program. My model:
model
{
for(i in 1:N){
Y[i] ~ dnorm(mu[i], tau)
mu[i] <- alpha + beta1 * x1[i]
+ beta2 * x2[i]
+ beta3 * x3[i]
+ beta4 * x4[i]
}
sigma <- 1/sqrt(tau)
alpha ~ dnorm(0, 1.0E-6)
beta1 ~ dnorm(0, 1.0E-6)
beta2 ~ dnorm(0, 1.0E-6)
beta3 ~ dnorm(0, 1.0E-6)
beta4 ~ dnorm(0, 1.0E-6)
tau ~ dgamma(1.0E-3, 1.0E-3)
}
checks out syntactically, and loading the data works fine. When I compile,
however, I get a "made use of undefined node mu (if mu is logical, check its
'parents' are defined). As far as I can tell, mu should be defined. I have
columns of data for x1,x2,x3,x4 and alpha and the betas have defined priors.
What am I doing wrong?
___________________
Jack Buckley
SUNY Stony Brook
Department of Political Science
[log in to unmask]
(631) 632-4353
-------------------------------------------------------------------
To mail the BUGS list, mail to [log in to unmask]
You can search old messages at www.jiscmail.ac.uk/lists/bugs.html
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
This list is for discussion of modelling issues and the BUGS
software. For help with crashes and error messages, first mail
[log in to unmask]
|