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

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)