Learn R Programming

EMC2 (version 3.1.0)

check.emc: Convergence Checks for an emc Object

Description

Runs a series of convergence checks, prints statistics to the console, and makes traceplots of the worst converged parameter per selection.

Usage

# S3 method for emc
check(
  emc,
  selection = c("mu", "sigma2", "alpha"),
  digits = 3,
  plot_worst = TRUE,
  ...
)

check(emc, ...)

Value

a list with the statistics for the worst converged parameter per selection

Arguments

emc

An emc object

selection

A Character vector. Indicates which parameter types to check (e.g., alpha, mu, sigma2, correlation).

digits

Integer. How many digits to round the ESS and Rhat to in the plots

plot_worst

Boolean. If TRUE also plots the chain plots for the worst parameter

...

Optional arguments that can be passed to get_pars or plot.default (see par())

Details

Note that the Rhat is calculated by doubling the number of chains by first splitting chains into first and second half, so it also a test of stationarity.

Efficiency of sampling is indicated by the effective sample size (ESS) (from the coda R package). Full range of possible samples manipulations described in get_pars.

Examples

Run this code
check(samples_LNR)

Run the code above in your browser using DataLab