Skip to contents

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

Usage

mcmc_diagnostics(x, n)

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

Arguments

x

[dynamitefit]
The model fit object.

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 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: 
#>                 
#> alpha_y[28]   72
#> alpha_y[10]  126
#> delta_y_x[7] 126
#> 
#> Smallest tail-ESS values: 
#>                  
#> nu_y_alpha_id6 83
#> sigma_y        91
#> alpha_y[28]    94
#> 
#> Largest Rhat values: 
#>                        
#> delta_y_y_lag1[28] 1.03
#> alpha_y[29]        1.03
#> alpha_y[28]        1.03