plotEssBurn: Plot Effective Sample Size (ESS) against burn-in

View source: R/plot.r

plotEssBurnR Documentation

Plot Effective Sample Size (ESS) against burn-in

Description

Takes an mcmc trace and tests the ESS at different values of burn-in

Usage

plotEssBurn(
  trace,
  longestBurnIn = ifelse(is.data.frame(trace) | is.matrix(trace) | is.mcmc(trace),
    nrow(trace), nrow(trace[[1]]))/2,
  stepSize = round(longestBurnIn/50)
)

Arguments

trace

either a data.frame or a list of data.frame with all variables in column, as returned by mcmcMh. Accept also mcmc or mcmc.list objects.

longestBurnIn

The longest burn-in to test. Defaults to half the length of the trace

stepSize

The size of the steps of burn-in to test. Defaults to 1/50th of longest.burn.in

Value

a plot of the ESS against burn.in

Examples

data(mcmcEpi)
plotEssBurn(mcmcEpi1)

sbfnk/fitR documentation built on July 18, 2023, 3:28 p.m.