Skip to contents

Prints HMC diagnostics and lists parameters with smallest effective sample sizes and largest Rhat values. See hmc_diagnostics() and posterior::default_convergence_measures() for details.

Usage

mcmc_diagnostics(x, ...)

# S3 method for dynamitefit
mcmc_diagnostics(x, n = 3L, ...)

Arguments

x

[dynamitefit]
The model fit object.

...

Ignored.

n

[integer(1)]
How many rows to print in parameter-specific convergence measures. The default is 3. Should be a positive (unrestricted) integer.

Value

Returns x (invisibly).

See also

Model diagnostics hmc_diagnostics(), lfo(), loo.dynamitefit()

Examples

data.table::setDTthreads(1) # For CRAN
mcmc_diagnostics(gaussian_example_fit)
#> NUTS sampler diagnostics:
#> 
#> No divergences, saturated max treedepths or low E-BFMIs.
#> 
#> Smallest bulk-ESS values: 
#>                       
#> nu_y_alpha_id16    106
#> alpha_y[28]        118
#> delta_y_y_lag1[14] 118
#> 
#> Smallest tail-ESS values: 
#>                  
#> alpha_y[7]    109
#> alpha_y[14]   111
#> delta_y_x[13] 114
#> 
#> Largest Rhat values: 
#>                     
#> delta_y_x[12]   1.04
#> delta_y_x[8]    1.03
#> nu_y_alpha_id39 1.03