Learn R Programming

bayestestR (version 0.11.5)

diagnostic_draws: Diagnostic values for each iteration

Description

Returns the accumulated log-posterior, the average Metropolis acceptance rate, divergent transitions, treedepth rather than terminated its evolution normally.

Usage

diagnostic_draws(posteriors, ...)

Arguments

posteriors

A stanreg or brms model.

...

Currently not used.

Examples

Run this code
# NOT RUN {
set.seed(333)

if (require("brms", quietly = TRUE)) {
  model <- brm(mpg ~ wt * cyl * vs,
    data = mtcars,
    iter = 100, control = list(adapt_delta = 0.80),
    refresh = 0
  )
  diagnostic_draws(model)
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab