Marginal and conditional r-squared values for mixed models are calculated
based on Nakagawa et al. 2017. For more details on the computation
of the variances, see get_variance
.
The marginal r-squared considers only the variance of the fixed effects, while the
conditional r-squared takes both the fixed and random effects into account.
The random effect variances are actually the mean random effect variances,
thus the r-squared value is also appropriate for mixed models with random
slopes or nested random effects (see Johnson 2014).