View source: R/get_diagnostics.R
get_diagnostics | R Documentation |
Function to extract Stan diagnostics from an HPR model
get_diagnostics(object = NULL, verbose = FALSE)
object |
The results object from a run of hpr. |
verbose |
A logical indicator of whether a full cmdstan diagnostic report should be printed to the console. The default is false. |
A dataframe with columns:
The number of HMC samples that ended in a divergence.
The number of HMC samples that had a max_treedepth warning.
The number of f parameters that had Rhat greater than 1.1, using the adjusted Rhat of Vehtari et al. (Bayesian Analysis, 2021).
The minimum effective sample size in the bulk of the posterior across the f parameters. This estimated according to Vehtari et al. (Bayesian Analysis, 2021).
The minimum effective sample size in the tails of the posterior across the f parameters. This estimated according to Vehtari et al. (Bayesian Analysis, 2021).
The length of the f vector (the systematic component of the model), which is a function of all other parameters in the model.
The number of HMC posterior samples.
The computing time of Stan sampling.
For more information on these metrics, please see Chase et al. (2022+) or the Stan reference manual.
X <- as.matrix(dat$Day, ncol = 1)
y <- dat$Temperature
mymodel <- hpr(y = y, X = X, family = "gaussian")
get_diagnostics(mymodel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.