Learn R Programming

performance (version 0.12.4)

r2_xu: Xu' R2 (Omega-squared)

Description

Calculates Xu' Omega-squared value, a simple R2 equivalent for linear mixed models.

Usage

r2_xu(model)

Value

The R2 value.

Arguments

model

A linear (mixed) model.

Details

r2_xu() is a crude measure for the explained variance from linear (mixed) effects models, which is originally denoted as Ω2.

References

Xu, R. (2003). Measuring explained variation in linear mixed effects models. Statistics in Medicine, 22(22), 3527–3541. tools:::Rd_expr_doi("10.1002/sim.1572")

Examples

Run this code
model <- lm(Sepal.Length ~ Petal.Length + Species, data = iris)
r2_xu(model)

Run the code above in your browser using DataLab