Learn R Programming

MuMIn (version 1.13.4)

r.squaredGLMM: Pseudo-R-squared for Generalized Mixed-Effect models

Description

Calculate conditional and marginal coefficient of determination for Generalized mixed-effect models (GLMM).

Usage

r.squaredGLMM(x)

Arguments

x
a fitted linear model object.

Value

  • r.squaredGLMM returns a numeric vector with two values for marginal and conditional GLMM.

encoding

utf-8

newcommand

  • \Rsqx
  • \Rsq

ifelse

  • latex
  • html
  • latex
  • html

eqn

$R^{2}$

enc

  • R_#1²

Details

For mixed-effects models, \Rsqcan be categorized into two types. Marginal GLMM represents the variance explained by fixed factors, and is defined as:

$$R_{GLMM(m)}^{2}= \frac{\sigma_f^2}{\sigma_f^2 + \sum_{l=1}^{u}\sigma_{l}^{2} + \sigma_e^2 + \sigma_d^2}$$

Conditional GLMM is interpreted as variance explained by both fixed and random factors (i.e. the entire model), and is calculated according to the equation:

$$R_{GLMM(c)}^{2}= \frac{\sigma_f^2 + \sum_{l=1}^{u}\sigma_{l}^{2}}{\sigma_f^2 + \sum_{l=1}^{u}\sigma_{l}^{2} + \sigma_e^2 + \sigma_d^2}$$

where $\sigma_f^2$ is the variance of the fixed effect components, and $\sum \sigma_{l}^{2}$ is the sum of all latex{$u$}{} variance components (group, individual, etc.), $\sigma_l^2$ is the variance due to additive dispersion and $\sigma_d^2$ is the distribution-specific variance.

References

Nakagawa, S, Schielzeth, H. (2013). A general and simple method for obtaining \Rsqfrom Generalized Linear Mixed-effects Models. Methods in Ecology and Evolution 4: 133–142

Johnson, P.C.D. (2014) Extension Nakagawa & Schielzeth’s GLMM to random slopes models. Methods in Ecology and Evolution 5: 44-946.

See Also

summary.lm, r.squaredLR

Examples

Run this code
if(require(nlme)) {
data(Orthodont, package = "nlme")

fm1 <- lme(distance ~ Sex * age, ~ 1 | Subject, data = Orthodont)

r.squaredGLMM(fm1)
r.squaredLR(fm1)
r.squaredLR(fm1, null.RE = TRUE)
}

Run the code above in your browser using DataLab