diag.mcmc.list {bdpopt}R Documentation

MCMC List For Diagnostic Evaluation


Get the mcmc.list object obtained when running the JAGS model corresponding to model. Diagnostic functions provided by the coda package may then be applied in order to check that there is a sufficent amount of adaptation and burn in for the application. This is a generic function for S3 objects.


diag.mcmc.list(model, utility.fun, data,
n.iter, n.burn.in, n.adapt = 1000, n.chains = 1, inits = NULL)



Simulation model object of class sim.model created using
sim.model or create.normal.model.


An R function defining the utility for the decision problem. It must be possible to extract the argument names of the function supplied with formals, and the argument names must constitute a subset of the names used in the JAGS model specification.


A named list of R objects which, when combined with the named objects in model$data, leads to a complete specification of the data for the JAGS model.


The number of iterations in the JAGS MCMC simulation.


The number of burn in iterations prior to the JAGS MCMC simulation.


The number of adaptation iterations prior to the burn in phase and subsequent JAGS MCMC simulation.


The number of parallel MCMC chains to run.


The initial values for the chain(s) passed on to the function rjags::jags.model, unless equal to its default value NULL, in which case JAGS chooses default initial values.


The purpose of this function is to make it possible for the user diagnose the JAGS output (e.g., using the coda package) and select appropriate values for n.iter, n.burn.in and n.adapt.


An object of type mcmc.list, as produced by rjags::coda.samples.


Sebastian Jobjörnsson jobjorns@chalmers.se

[Package bdpopt version 1.0-1 Index]