subChains.twDEMC: subChains twDEMC

Description Usage Arguments Details Value Author(s) See Also

Description

Condenses an twDEMC List to the chains iChains e.g 1:4.

Usage

1
2
3
## S3 method for class 'twDEMC'
subChains(x, iChains = NULL, iPops = NULL, nPop = getNPops(x), 
    ..., doKeepBatchCall = FALSE)

Arguments

x

the twDEMC object to select chains from

iChains

integer vector: the chains to select

iPops

integer vector: the populations, whose chains should be selected

nPop

number of populations in x

...

not used

doKeepBatchCall

wheter to retain the batch call attribute of x

Details

Alternatively to specification of iChains, one can specify a vector of populations and the total number of populations.

The twDEMC class

The twDEMC class represents MCMC results with all chains having the same length. This is usually a result by a call to concatPops.twDEMCPops. It holds the same results as the twDEMCPops class, except that the entries in pops list are concatenated by chain.

  • parms: array (nStep, nParm, nChain) of parameter samples

  • temp: matrix (nStep, nResComp ) of temperature, one collumn for each logDensity components

  • parms: array (nStep, nBlock, nChain) acceptance rate

  • resLogDen: array (nStep, nResComp, nChain) results of logDensities

  • logDen: array (nStep, nBlock, nChain) sum across logDensity components for each block

  • Y: array (lastUnthinnedSteps, nParm+nBlock+nResComp, nChain) of parameters, acceptance per block and result components of latest unthinned steps

There are several methods access properties, i.e. an object of class twDEMC

  • number of generations: getNGen.twDEMC

  • number of samples (only one sample each thinning inteval): getNSamples.twDEMC

  • number of chains: getNChains.twDEMC

  • number of populations: getNPops.twDEMC

  • number of chains per population: getNChainsPop.twDEMC

  • number of parameters: getNParms.twDEMC

  • thinning interval: res$thin

There are several methods to transform or subset:

  • select chains or sub-populations: this method

  • thin all the chains: thin.twDEMC

  • select subset of cases: subset.twDEMC

  • combine several twDEMC results to a bigger set of populations combinePops.twDEMC

  • stack all the results of all chains to one big matrix stackChains.twDEMC

There are several methods utilize the functions of the coda package.

  • convert an twDEMC to a coda mcmc.list as.mcmc.list.twDEMC

  • applying a function to all of the chains: mcmcListApply

  • stack all the results of all chains to one big matrix: stackChains.mcmc.list

  • transforming parameters transOrigPopt.mcmc.list

Value

A list of class twDEMC (see twDEMCBlockInt).

Author(s)

Thomas Wutzler

See Also

twDEMC


twDEMC documentation built on May 2, 2019, 5:38 p.m.