coda_neff: Create effective sample size diagnostic graphic

Description Usage Arguments Value Author(s) See Also Examples

Description

coda_neff creates a graphic of the effective sample size. The left-hand y-axis is the total effective size and the right-hand y-axis is the effective size scaled by the total number of MCMC draws.

Usage

1
coda_neff(neff, samps, thresh = 0.5, cex.labels = 0.5)

Arguments

neff

named vector of Neff values

samps

total number of MCMC draws (N chains * N draws)

thresh

threshold used to flag parameters with low effective sample sizes, as a percentage of total MCMC draws

cex.labels

scaling for parameters plotted by name

Value

Invisibly returns a vector of the effective sample size for each parameter sorted from lowest (first) to highest (last) and prints a plot of the effective sample sizes.

Author(s)

Michael Malick

See Also

effectiveSize

Examples

1
2
3
4
5
6
library(coda)
data(line)

neff  <- coda::effectiveSize(line)
samps <- coda::niter(line) * coda::nchain(line)
coda_neff(neff, samps)

MichaelMalick/r-codatools documentation built on May 8, 2019, 9:56 a.m.