Description Usage Arguments Details Value
These functions are derived from from Michael Betancourt's Robust Stan Workflow, Stan case study.
1 2 3 4 5 6 7 | check_div(fit)
check_treedepth(fit)
check_energy(fit, threshhold = 0.2)
partition_div(fit, pars = NULL)
|
fit |
A |
threshhold |
If any chain has an E-BFI below |
pars |
A character vector of parameters to include. |
Check transitions that ended with a divergence
Check chains for low E-BFI.
Partitions parameters into divergent and non-divergent iterations.
These functions are largely run interactively in order to
A list with two elements: n_div
is an integer scalar
with the total number of divergences, and n_iter
is an integer scalar
with the total number of iterations.
A list with three elements:
max_depth
The maximum treedepth used in the sampler.
n_max
The number of iterations reaching the maximum depth.
n_iter
The total number of elements.
A numeric vector with the E-BFI for each chain.
A data frame with a row for each (sample, parameter), and columns,
.iter
Iteration number
.chain
Chain number
.div
Was this iteration a divergence?
parameter
parameter name
value
parameter value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.