mvgam_diagnostics | R Documentation |
Extract quantities that can be used to diagnose sampling behavior of the algorithms applied by Stan at the back-end of mvgam.
## S3 method for class 'mvgam'
nuts_params(object, pars = NULL, ...)
## S3 method for class 'mvgam'
log_posterior(object, ...)
## S3 method for class 'mvgam'
rhat(x, pars = NULL, ...)
## S3 method for class 'mvgam'
neff_ratio(object, pars = NULL, ...)
object , x |
A |
pars |
An optional character vector of parameter names.
For |
... |
Arguments passed to individual methods. |
For more details see
bayesplot-extractors
.
The exact form of the output depends on the method.
simdat <- sim_mvgam(n_series = 1, trend_model = 'AR1')
mod <- mvgam(y ~ s(season, bs = 'cc', k = 6),
trend_model = AR(),
noncentred = TRUE,
data = simdat$data_train,
chains = 2)
np <- nuts_params(mod)
head(np)
# extract the number of divergence transitions
sum(subset(np, Parameter == "divergent__")$Value)
head(neff_ratio(mod))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.