coda.samples.dic {BayesCACE}R Documentation

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, ...)

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

Value

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

References

Plummer M (2021). rjags: Bayesian Graphical Models using MCMC. R package version 4-12, https://CRAN.R-project.org/package=rjags.

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


[Package BayesCACE version 1.2.3 Index]