I am running a BUGS function with following
 
schools.sim <-bugs(data,inits,
                             parameters,
                             model.file="schools.txt",
                             n.chains=3,
                             n.iter=1000,
                             bugs.directory="E:/Rprograms")
 
My model.file IS in the directory ="E:/Rprograms" and the code is: 
 
model{
    for (j in 1:J){
            y[j] ~ dnorm (theta[j], tau.y[j])
            theta[j] ~ dnorm (mu.theta, tau.theta)
            tau.y[j] <- pow(sigma.y[j], -2)
    }
    mu.theta ~ dnorm (0.0, 1.0E-6)
    tau.theta <- pow(sigma.theta, -2)
    sigma.theta ~ dunif (0, 1000) 
 
I am getting the following error which I can't understand.   
 
Error in bugs(data, inits, parameters, model.file = "schools.txt", n.chains = 
3,  : 
  schools.txt does not exist.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to