mcmc.list: Replicated Markov Chain Monte Carlo Objects

Description Usage Arguments Author(s) See Also Examples

Description

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 to 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 time, window, start, end, frequency and thin for mcmc.list objects.

An mcmc.list can be indexed as if it were a single mcmc object using the [ operator (see examples below). The [[ operator selects a single mcmc object from the list.

Usage

1
2
3

Arguments

...

a list of mcmc objects

x

an object that may be coerced to mcmc.list

Author(s)

Martyn Plummer

See Also

mcmc.

Examples

1
2
3
4
data(line)
x1 <- line[[1]]                    #Select first chain
x2 <- line[,1, drop=FALSE]         #Select first var from all chains
varnames(x2) == varnames(line)[1]  #TRUE

Example output

[1] TRUE

coda documentation built on Oct. 24, 2020, 9:10 a.m.

Related to mcmc.list in coda...