tests/TestFor-rjags.R

library(rjags)

simple.model <-
  "model
{
     y ~ dnorm(mu, tau)
     mu ~ dnorm(0, 1)
     tau ~ dgamma(0.1, 0.1)
}
"

simple.model.file <- tempfile()
cat(simple.model, file=simple.model.file)

jags.data <- list(y=0)
jm <- jags.model(file=simple.model.file,
                 data=jags.data)

update(jm, 100)

Try the BALD package in your browser

Any scripts or data that you put into this service are public.

BALD documentation built on May 2, 2019, 6:51 a.m.