This function prints fixed effects and variance components for a mixed model.
summarize_model(
model,
ci = TRUE,
show_cor_re = FALSE,
show_cor_fe = FALSE,
exponentiate = FALSE,
digits = 2,
component = NULL,
...
)
summarise_model(
model,
ci = TRUE,
show_cor_re = FALSE,
show_cor_fe = FALSE,
exponentiate = FALSE,
digits = 2,
component = NULL,
...
)
A supported model.
Whether to include a 95% uncertainty interval for the variance components. Default is TRUE.
Whether to include the correlations of the random effects. Default is FALSE.
Whether to include the correlations of the fixed effects. Default is FALSE.
Exponentiate the fixed-effect coefficient estimates and
confidence intervals (common for logistic regression). If TRUE
, also
scales the standard errors by the exponentiated coefficient, transforming
them to the new scale.
Digits to display.
For glmmTMB objects, which of the three components 'cond', 'zi' or 'other' to select. Default is cond. Minimal testing on other options.
Not used at present. May allow model-specific functionality.
Prints the variance components, fixed effects, etc. Invisibly, a list of those.
This basically does pretty printing of the results of extract_vc()
and extract_fixed_effects()
.
Not tested yet for complicated stanreg
objects like multivariate or
joint models.
library(lme4)
library(mixedup)
lmer_mod <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
summarize_model(lmer_mod)
#> Computing profile confidence intervals ...
#>
#> Variance Components:
#> Group Effect Variance SD SD_2.5 SD_97.5 Var_prop
#> Subject Intercept 612.10 24.74 14.38 37.72 0.47
#> Subject Days 35.07 5.92 3.80 8.75 0.03
#> Residual 654.94 25.59 22.90 28.86 0.50
#>
#> Fixed Effects:
#> Term Value SE t P_value Lower_2.5 Upper_97.5
#> Intercept 251.41 6.82 36.84 0.00 238.03 264.78
#> Days 10.47 1.55 6.77 0.00 7.44 13.50