check_hmc_diagnostics {rstan} | R Documentation |
These functions print summaries of important HMC diagnostics.
The check_hmc_diagnostics
function calls the other functions internally
and prints an overall summary, but the other functions can also be called
directly:
check_divergences
prints the number (and percentage) of iterations that
ended with a divergence, check_treedepth
prints the number
(and percentage) of iterations that saturated the max treedepth,
and check_energy
prints E-BFMI values for each chain for which E-BFMI
is less than 0.2.
Brief explanations of some of the problems detected by these diagnostics can be found at http://mc-stan.org/misc/warnings.html. For more depth see Betancourt (2017).
check_hmc_diagnostics(object) check_divergences(object) check_treedepth(object) check_energy(object)
object |
A stanfit object. |
The Stan Development Team Stan Modeling Language User's Guide and Reference Manual. http://mc-stan.org/.
Betancourt, M. (2017). A conceptual introduction to Hamiltonian Monte Carlo. https://arxiv.org/abs/1701.02434.
## Not run: schools <- stan_demo("eight_schools") check_hmc_diagnostics(schools) check_divergences(schools) check_treedepth(schools) check_energy(schools) ## End(Not run)