Learn R Programming

⚠️There's a newer version (2.2.2-5) of this package.Take me there.

runjags (version 0.9.5-1)

Run Bayesian MCMC Models in the BUGS syntax from Within R

Description

A set of functions to allow any user specified model to be run in JAGS from within R, returning the MCMC chains as R objects. Includes functions to read external WinBUGS type textfiles, and allows several ways of automatically specifying model data from existing R objects or R functions. Also includes functions to automatically calculate model run length, autocorrealtion and Gelman Rubin statistic diagnostics for all models to simplify the process of achieving chain convergence. Designed for maximum compatibility with WinBUGS syntax, although minor modification to existing .bug files will be required. Requires Just Another Gibbs Sampler (JAGS) for most functions, see: http://www-fis.iarc.fr/~martyn/software/jags/

Copy Link

Version

Install

install.packages('runjags')

Monthly Downloads

10,066

Version

0.9.5-1

License

GPL

Maintainer

Matthew Denwood

Last Published

October 15th, 2009

Functions in runjags (0.9.5-1)

findjags

Attempt to Locate a JAGS Install
combine.mcmc

Combine Two or More MCMC Objects With the Same Number of Chains Into One Longer MCMC Object
ask

Obtain Input from User With Error Handling
autorun.jags

Run a User Specified Bayesian MCMC Model in JAGS with Automatically Calculated Run Length and Convergence Diagnostics
timestring

Calculate the Elapsed Time in Sensible Units
new_unique

Create a Unique Filename
autorun.jagsfile

Read a User Specified Model in a WinBUGS Type Textfile or Character Variable, and Run the Simulation in JAGS with Automatically Calculated Run Length and Convergence Diagnostics
run.jags

Run a User Specified Bayesian MCMC Model in JAGS from Within R
dump.format

Produce a Character String in the R Dump Format to Be Used With Jags
run.jagsfile

Read a User Specified Model in a WinBUGS Type Textfile or Character Variable, and Run the Simulation in JAGS from Within R
read.winbugs

Extract Any Models, Data, Monitored Variables or Initial Values As Character Vectors from a Winbugs Type Textfile
testjags

Analyse the System to Check That Jags Is Installed