50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

imt (version 1.0.0)

mcmcChecks: MCMC Checks

Description

Checks convergence, mixing, effective sample size, and divergent transitions

Arguments

Methods

$new(fit, pars)

Runs diagnostics on the supplied stanfit object, restricted to parameters identified by the character vector pars.
Tests include:
Share of specified parameters with an Rhat less than 1.1. If any have an Rhat > 1.1, everything_looks_fine is set to FALSE.
Share of specified parameters with an n_eff at least 0.1% of the total number of posterior draws. If any have n_eff < 0.001 * N, everything_looks_fine is set to FALSE.
Share of specified parameters with an n_eff of at least 100. If any have n_eff < 100, everything_looks_fine is set to FALSE.
Number of divergent transitions during posterior sampling. If there are any whatsoever, everything_looks_fine is set to FALSE.
Share of posterior iterations where the sampler reached the maximum treedepth. If more than 25\ everything_looks_fine is set to FALSE.

Active bindings

everything_looks_fine

logical indicating whether all MCMC tests passed.

diagnostics

list of the outcome of each MCMC test

warnings

list of the warning messages from failed MCMC tests

Methods


Method new()

Initialize a new mcmcChecks object and run diagnostics

Usage

mcmcChecks$new(fit, pars)

Arguments

fit

A stanfit object to check

pars

A character vector of parameter names to check


Method clone()

The objects of this class are cloneable with this method.

Usage

mcmcChecks$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.