Learn R Programming

BayesCACE (version 1.2.3)

coda.samples.dic: Generate posterior samples in mcmc.list format

Description

This is a wrapper function for jags.samples which sets a trace monitor for all requested nodes, updates the model, and coerces the output to a single mcmc.list object. It also converts to the output to dic format. This function is based on the coda.samples function from the rjags library, and modified by Prof. Matthias Mittner.

Usage

coda.samples.dic(model, variable.names, n.iter, thin, ...)

Value

It returns the output to the input model object, and in dic format.

Arguments

model

a jags model object

variable.names

a character vector giving the names of variables to be monitored

n.iter

number of iterations to monitor

thin

thinning interval for monitors

...

optional arguments that are passed to the jags.samples method from the rjags library, for jags model objects

References

plummer2021rjagsBayesCACE

https://ihrke.github.io/post/2014/10/07/dicjags/