Replicated Markov Chain Monte Carlo Objects
The function `mcmc.list' is used to represent parallel runs of the same chain, with different starting values and random seeds. The list must be balanced: each chain in the list must have the same iterations and the same variables.
Diagnostic functions which act on
mcmc objects may also be applied
mcmc.list objects. In general, the chains will be combined,
if this makes sense, otherwise the diagnostic function will be applied
separately to each chain in the list.
Since all the chains in the list have the same iterations, a single time
dimension can be ascribed to the list. Hence there are time series methods
mcmc.list can be indexed as if it were a single mcmc object
[ operator (see examples below). The
selects a single
mcmc object from the list.
mcmc.list(...) as.mcmc.list(x, ...) is.mcmc.list(x)
- a list of mcmc objects
- an object that may be coerced to mcmc.list
data(line) x1 <- line[] #Select first chain x2 <- line[,1, drop=FALSE] #Select first var from all chains varnames(x2) == varnames(line) #TRUE