my.acfplot: Custom autocorrelation plots

Description Usage Arguments Examples

View source: R/my.acfplot.R

Description

Function to draw autocorrelation plots the way I like them – with huge lags because my chain mixing sucks.

Usage

1
my.acfplot(acfplot.vec, label = NULL, thin = 0, burn = 0, lag.max = 100)

Arguments

acfplot.vec

Vector containing draws from the MCMC sampler

label

Parameter label and title for the plot. Default is no label.

thin

Amount of thinning applied to the plot. For example, if thin=3, then every third sample point will be plotted. The total number of iterations should be divisible by the thinning amount.

burn

Number of iterations for burn-in.

lag.max

Maximum lag for which to calculate autocorrelation. Defaults to 100.

Examples

1
2
3
## Draw an autocorrelation plot for a random sample
my.samples = rnorm(10000, 5, 10)
my.acfplot(my.samples,label="Some title",thin=5,burn=1000,lag.max=30)

lcomm/ltools documentation built on May 20, 2019, 11:28 p.m.