This function calculates several measures of explained variance ($R^2$) for linear-mixed effects models.
It can be used with a single model, as produced by the packages lme4
or nlme
, or a list of fitted models produced by with.mitml.list
.
In the latter case, the $R^2$ measures are calculated separately for each imputed data set and then averaged across data sets.
Different $R^2$ measures can be requested using the print
argument.
Specifying RB1
and RB2
will return the explained variance at level 1 and level 2, respectively, according to Raudenbush and Bryk (2002, pp. 74 and 79).
Specifying SB
will return the total variance explained according to Snijders and Bosker (2012, p. 112).
Specifying MVP
will return the total variance explained based on ``multilevel variance partitioning'' as proposed by LaHuis, Hartman, Hakoyama, and Clark (2014).