check_hmc_diagnostics: Check HMC diagnostics after sampling

Description Usage Arguments Details References Examples

View source: R/check_hmc_diagnostics.R

Description

These functions print summaries of important HMC diagnostics or extract those diagnostics from a stanfit object. See the Details section, below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

Arguments

object

A stanfit object.

Details

The check_hmc_diagnostics function calls the other check_* functions internally and prints an overall summary, but the other functions can also be called directly:

The get_* functions are for programmatic access to the diagnostics.

The following are several of many resources that provide more information on these diagnostics:

References

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.

Gabry, J., Simpson, D., Vehtari, A., Betancourt, M., and Gelman, A. (2018). Visualization in Bayesian workflow. Journal of the Royal Statistical Society Series A, accepted for publication. arXiv preprint: http://arxiv.org/abs/1709.01449.

Examples

1
2
3
4
5
6
7
8
## Not run: 
schools <- stan_demo("eight_schools")
check_hmc_diagnostics(schools)
check_divergences(schools)
check_treedepth(schools)
check_energy(schools)

## End(Not run)

rstan documentation built on Nov. 8, 2018, 1:04 a.m.