Learn R Programming

BayesianTools (version 0.1.0)

convertCoda: Convert coda::mcmc objects to BayesianTools::mcmcSampler

Description

Function is used to make the plot and diagnostic functions available for coda::mcmc objects

Usage

convertCoda(sampler, names = NULL, info = NULL, likelihood = NULL)

Arguments

sampler
An object of class mcmc or mcmc.list
names
vector giving the parameter names (optional)
info
matrix (or list with matrices for mcmc.list objects) with three coloumns containing log posterior, log likelihood and log prior of the sampler for each time step (optional; but see Details)
likelihood
likelihood function used in the sampling (see Details)

Details

The parameter 'likelihood' is optional for most functions but can be needed e.g for using the DIC function. Also the parameter info is optional for most uses. However for some functions (e.g. MAP) the matrix or single coloumns (e.g. log posterior) are necessary for the diagnostics.