chainSummary: Manipulate MCMC samples

Description Usage Arguments Details Value

Description

Manipulate the samples generated by the Metropolis samplers.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
chainSummary(s)

chainTail(s, discard = 0, thin = 1)

chainLast(s)

chainCollapse(s, collapse = TRUE, discard = 0, thin = 1, chains = NULL)

chainCov(s, discard = 0, chains = NULL)

chainBcov(s, discard = 0, chains = NULL)

chainAcceptance(s, collapse = FALSE, chains = NULL)

Arguments

s

a single chain or a list of parallel chains generated by estelleMetropolis or stellaMetropolis.

discard

number of initial samples to discard.

thin

rate at which to thin the sample.

collapse

whether to collapse parallel chains to a single chain

chains

the set of chains to retain, or NULL.

Details

These functions provide some basic operations on the samples generated by the Metropolis samplers for Estelle and Stella.

Value

chainSummary returns a summary of the sample chainTail discards the initial samples from each chain chainLast returns the last sample for each location in each chain chainCollapse collapses multiple chains into a single sample chainCov returns the covariance of the parameters location by location as a pxpxn array. chainBcov returns the joint covariance of the parameters as an (np)x(np) array. chainAcceptance returns the acceptance rate in the (thinned) chain


KateGoodenough/RoL-SGAT documentation built on June 11, 2019, 1:29 p.m.