This function extracts the estimated variance components of a linear (mixed) model. It is compatible with models from lme4, glmmTMB, and lm functions. The resulting output is a tibble that contains the variance components, their proportion of the total variance, and standard deviations. This function is heavily based on mixedup::extract_vc().

get_varcomp(model, digits = 3)

# S3 method for lm
get_varcomp(model, digits = 3)

# S3 method for merMod
get_varcomp(model, digits = 3)

# S3 method for glmmTMB
get_varcomp(model, digits = 3)

Arguments

model

a fitted model object

digits

Rounding. Default is 3.