saveJAGS-package: A wrapper for 'rjags' that regularly saves the output to...

Description Details Author(s)

Description

Yet another wrapper for rjags, to compete with jagsUI, R2jags, runjags and the rest. The saveJAGS function runs JAGS to extract blocks of samples and saves each block to file. These files can later be loaded into R and a mcmc.list object constructed. For analyses requiring a long run-time, the output is safe even if the run is interrupted.

Details

The core function, saveJAGS, works in the same way as other wrappers, accepting a list of data, initial values, a list of parameters to monitor, and the name of a text file containing the model. The user specifies the number of iterations per block and the number of blocks to extract for each chain. If run in parallel, the workers write separate files. The function returns a list of file names.

The file names are then passed to the function combineSaves, which produces an object of class mcmc.list. Utility functions are available to convert this into a list in the same format as the sims.list component in the output from other wrappers.

Author(s)

Mike Meredith

Maintainer: Mike Meredith <mmeredith@wcs.org>


mikemeredith/saveJAGS documentation built on March 16, 2021, 3:40 p.m.