Skip to content

r2glmm

0.1.3Package record

Computes R Squared for Mixed (Multilevel) Models

0packages depend
15.7Kdownloads / year
31.0%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.1.3
  • Added a NEWS.md file 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

CRAN checks
13OK
Slowest check: 1.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.3
READMEYes · 722 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.3Citation fileNoWebsitenot declared in DESCRIPTION
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

15.7K
CRAN downloads in the past year
Rank #4,368 · ~43/day · ~1.3K/mo
Daily download trend is not available in this view yet.
65130 days
2K90 days
15.7K1 year
Compare downloads with other packages →
Also on124 r2u37 autocran98 c2d4u

Repository

16Stars
8Forks
5Open issues
0Open PRs
0Releases
47Commits
1Commit identities
47 commits · Last activity 2025-04-28
Responsiveness
How these are sampled
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

2024-09-23 · 162026-07-07 · 16
PracticesBeta

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.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)

Installing r2glmm adds 65 packages (34 with compiled code, 60 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.

Depends (0)
none
Imports (9)
mgcvMatrixpbkrtestggplot2afexstatsMASSgridExtragrid
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 0.1.0 (2016)
Releases (4)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.3Latest
    record
    2025-04-28 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1.2
    record
    2017-08-05 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.1.1
    record
    2016-11-28 · diff ↗ ·
    removed 1 export
    plot_r2
    added 2 exports
    pqlmer, r2dt
  • 0.1.0
    record
    2016-09-15
  • R
    R 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")
Jaeger, B. (2025). r2glmm: Computes R Squared for Mixed (Multilevel) Models (Version 0.1.3) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for r2glmm version 0.1.3 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy