diagnostic-quantities | R Documentation |
Extract quantities that can be used to diagnose sampling behavior of the algorithms applied by Stan at the back-end of brms.
## S3 method for class 'brmsfit'
log_posterior(object, ...)
## S3 method for class 'brmsfit'
nuts_params(object, pars = NULL, ...)
## S3 method for class 'brmsfit'
rhat(x, pars = NULL, ...)
## S3 method for class 'brmsfit'
neff_ratio(object, pars = NULL, ...)
object , x |
A |
... |
Arguments passed to individual methods. |
pars |
An optional character vector of parameter names.
For |
For more details see
bayesplot-extractors
.
The exact form of the output depends on the method.
## Not run:
fit <- brm(time ~ age * sex, data = kidney)
lp <- log_posterior(fit)
head(lp)
np <- nuts_params(fit)
str(np)
# extract the number of divergence transitions
sum(subset(np, Parameter == "divergent__")$Value)
head(rhat(fit))
head(neff_ratio(fit))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.