Computes R Squared for Mixed (Multilevel) Models
Overview
The model R squared and semi-partial R squared for the linear and generalized linear mixed model (LMM and GLMM) are computed with confidence limits. The R squared measure from Edwards et.al (2008) DOI:10.1002/sim.3429 is extended to the GLMM using penalized quasi-likelihood (PQL) estimation (see Jaeger et al. 2016 DOI:10.1080/02664763.2016.1193725). Three methods of computation are provided and described as follows. First, The Kenward-Roger approach. Due to some inconsistency between the 'pbkrtest' package and the 'glmmPQL' function, the Kenward-Roger approach in the 'r2glmm' package is limited to the LMM. Second, The method introduced by Nakagawa and Schielzeth (2013) DOI:10.1111/j.2041-210x.2012.00261.x and later extended by Johnson (2014) DOI:10.1111/2041-210X.12225. The 'r2glmm' package only computes marginal R squared for the LMM and does not generalize the statistic to the GLMM; however, confidence limits and semi-partial R squared for fixed effects are useful additions. Lastly, an approach using standardized generalized variance (SGV) can be used for covariance model selection. Package installation instructions can be found in the readme file.
- Added a
NEWS.mdfile to track changes to the package. - Updated semi-partial computation. Categorical variables and polynomial regression variables are now grouped.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 10
- Examples that run
- 100%9 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 10%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 41
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
3 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/bcjaeger/r2glmm on 2026-10-21.
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.1.3Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 0.1.22017-08-05 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.1.1
- 0.1.02016-09-15
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2016-09-15
- Total releases
- 4 / 10 yrs
- License
- GPL-2 OSI
- Download size
- 21 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("r2glmm")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.