plotAuto: Plot MCMC Autocorrelation

Description Usage Arguments Value Note See Also Examples

View source: R/plotAuto.R

Description

Plot Markov chain Monte Carlo autocorrelation over a range of lag values. This is a diagnostic plot for deciding whether a chain needs further thinning.

Usage

1
2
plotAuto(mcmc, thin=1, log=FALSE, base=10, main=NULL, xlab="Lag",
         ylab="Autocorrelation", lty=1, lwd=1, col="black", ...)

Arguments

mcmc

MCMC chain(s) as a vector, data frame or mcmc object.

thin

interval to subsample chain(s), or 1 to keep chain intact.

log

whether values should be log-transformed.

base

logarithm base.

main

main title.

xlab

x-axis label.

ylab

y-axis label.

lty

line type.

lwd

line width.

col

line color.

...

passed to autocorr.plot, title, and axis.

Value

Null, but a plot is drawn on the current graphics device.

Note

The Args function from the gdata package is recommended for reviewing the arguments, instead of args.

See Also

autocorr.plot is the underlying plotting function, and window.mcmc is used to optionally thin the chain(s).

plotTrace, plotAuto, plotCumu, and plotSplom are diagnostic plots.

plotDens and plotQuant are posterior plots.

plotMCMC-package gives an overview of the package.

Examples

1
2
3
plotAuto(xpar$R0)
plotAuto(xpar$R0, thin=10)
plotAuto(xpar, lag.max=50, ann=FALSE, axes=FALSE)

Example output



plotMCMC documentation built on Nov. 23, 2020, 5:08 p.m.