mcmc_thin: Thin an MCMC object to reduce autocorrelation.

Description Usage Arguments Value Author(s) See Also Examples

Description

This function reduces the autocorrelation of an MCMC run from Metro_Hastings() by retaining only every <thin> iterations of the chain.

Usage

1
mcmc_thin(mcmc_object, thin = 5)

Arguments

mcmc_object

object returned by a call to Metro_Hastings()

thin

integer: retain only every <thin> iterations of the MCMC.

Value

object (list) of the same type as that returned by a call to Metro_Hastings()

Author(s)

Corey Chivers <corey.chivers@mail.mcgill.ca>

See Also

Metro_Hastings,BCI, plotMH

Examples

1
2
3
4
data(mcmc_r)
## Thin the results of a simple Bayesian linear regression
mcmc_rTHINNED<-mcmc_thin(mcmc_r) 
plotMH(mcmc_rTHINNED)

Example output

Loading required package: MASS

MHadaptive documentation built on May 1, 2019, 10:31 p.m.