An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090819/7afcd32b/attachment-0001.pl>
BUGS
3 messages · James Lenihan, stephen sefick, Uwe Ligges
Naively it seems that there is no school.txt file in your specified directory. Stephen Sefick On Wed, Aug 19, 2009 at 12:05 PM, James
Lenihan<jameslenihan at sbcglobal.net> wrote:
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 at 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.
Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
stephen sefick wrote:
Naively it seems that there is no school.txt file in your specified directory. Stephen Sefick On Wed, Aug 19, 2009 at 12:05 PM, James Lenihan<jameslenihan at sbcglobal.net> wrote:
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:
According to ?bugs: bugs.directory: directory that contains the WinBUGS executable. If the global option R2WinBUGS.bugs.directory is not NULL, it will be used as the default. working.directory: sets working directory during execution of this function; WinBUGS' in- and output will be stored in this directory; if NULL, a temporary working directory via tempdir is used. So either specify working.directory in a way that it points to the model.txt file or specify a full path name for your model.file I don't believe that bugs.directory="E:/Rprograms" will do anything sensible (as it should point to your WinBUGS installation. Uwe Ligges
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 at 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.