Checks MCMC diagnostics (Rhat, ESS, divergences) and prints actionable
warnings with suggestions for fixing issues.
Usage
check_diagnostics(fit, quiet = FALSE)
Arguments
- fit
A ratiod_fit object
- quiet
Logical; if TRUE, suppress output and just return status.
Value
Invisibly returns a list with diagnostic status:
- ok
Logical; TRUE if all diagnostics pass
- n_divergent
Number of divergent transitions
- n_bad_rhat
Number of parameters with Rhat > 1.01
- n_low_ess
Number of parameters with ESS < 400