Checks convergence, mixing, effective sample size, and divergent transitions
$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.
everything_looks_finelogical indicating whether all MCMC tests passed.
diagnosticslist of the outcome of each MCMC test
warningslist of the warning messages from failed MCMC tests
new()Initialize a new mcmcChecks object and run diagnostics
mcmcChecks$new(fit, pars)fitA stanfit object to check
parsA character vector of parameter names to check
clone()The objects of this class are cloneable with this method.
mcmcChecks$clone(deep = FALSE)deepWhether to make a deep clone.