## original model
if (FALSE) {
brms_crossedRE <- brm(mpg ~ wt + (1|cyl) + (1+wt|gear), data = mtcars,
iter = 500, chains = 2)
}
# \donttest{
## too slow for CRAN (>5 seconds)
## load stored object
load(system.file("extdata", "brms_example.rda", package="broom.mixed"))
fit <- brms_crossedRE
tidy(fit)
tidy(fit, parameters = "^sd_", conf.int = FALSE)
tidy(fit, effects = "fixed", conf.method="HPDinterval")
tidy(fit, effects = "ran_vals")
tidy(fit, effects = "ran_pars", robust = TRUE)
if (require("posterior")) {
tidy(fit, effects = "ran_pars", rhat = TRUE, ess = TRUE)
}
# glance method
glance(fit)
## this example will give a warning that it should be run with
## reloo=TRUE; however, doing this will fail
## because the \code{fit} object has been stripped down to save space
suppressWarnings(glance(fit, looic = TRUE, cores = 1))
head(augment(fit))
# }
Run the code above in your browser using DataLab