R/jags2bugs.R

Defines functions jags2bugs

Documented in jags2bugs

jags2bugs <- function(path=getwd(), parameters.to.save, n.chains=3, n.iter=2000, n.burnin=1000, n.thin=2, DIC=TRUE){
  setwd(path)
  #require(R2WinBUGS)
  fit <- jags.sims(parameters.to.save, n.chains=n.chains, n.iter=n.iter, n.burnin=n.burnin, n.thin=n.thin, DIC = DIC)
  class(fit) <- "bugs"
  return(fit)
}                       

Try the R2jags package in your browser

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

R2jags documentation built on Oct. 13, 2024, 9:07 a.m.