Reports random effects of mixed models (see list of supported objects in
report()
).
Arguments
- x
The R object that you want to report (see list of of supported objects above).
- ...
Arguments passed to or from other methods.
Examples
library(report)
# Mixed models
if (require("lme4")) {
model <- lme4::lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
r <- report_random(model)
r
summary(r)
}
#> [1] "The model included Species as random effect"
# \donttest{
# Bayesian models
if (require("rstanarm")) {
model <- stan_lmer(mpg ~ disp + (1 | cyl), data = mtcars, refresh = 0, iter = 1000)
r <- report_random(model)
r
summary(r)
}
#> Warning: There were 2 divergent transitions after warmup. See
#> https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
#> to find out why this is a problem and how to eliminate them.
#> Warning: Examine the pairs() plot to diagnose sampling problems
#> [1] "The model included cyl as random effect"
# }
if (FALSE) {
if (require("brms")) {
model <- brm(mpg ~ disp + (1 | cyl), data = mtcars, refresh = 0, iter = 1000)
r <- report_random(model)
r
summary(r)
}
}