Displaying 1 result from an estimated 1 matches for "testjag".
Did you mean:
testjags
2010 Mar 26
1
cacheSweave fails when used in conjunction with rjags
...bug ***
model {
mu ~ dnorm(0,1.0E-5)
sigma ~ dunif(0,100)
for(i in 1:length(y)) {
y[i] ~ dnorm(mu,sigma)
}
}
***
*** .Rnw file; name=testCacheSweave-jags.Rnw ***
\documentclass[12pt]{article}
\usepackage{Sweave}
\begin{document}
<<loadLib>>=
library(rjags)
@
<<testJags,cache=T>>=
y <- rnorm(100)
m <- jags.model("j.bug")
update(m,100)
res <- coda.samples(m,c("mu","sigma"),n.iter=1000)
@
<<plotResults,fig=T>>=
plot(res)
@
\end{document}
***
When I run Sweave with cacheSweaveDriver, I get the following err...