# NOT RUN {
# rstanarm models
# -----------------------------------------------
if (require("rstanarm", quietly = TRUE)) {
model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
diagnostic_posterior(model)
}
# brms models
# -----------------------------------------------
if (require("brms", quietly = TRUE)) {
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
diagnostic_posterior(model)
}
# }
Run the code above in your browser using DataLab