Skip to content

mmrm

0.3.19

Mixed Models for Repeated Measures

5packages dependsuggested by 8
86.4Kdownloads / year
97.8%test coverage
13/13flavors OK

Overview

About
Maintained by Daniel Sabanes BoveCRAN page ↗GitHub ↗Website ↗Issues ↗Declared funders: AstraZeneca plc, Boehringer Ingelheim Ltd. and 4 more

Mixed models for repeated measures (MMRM) are a popular choice for analyzing longitudinal continuous outcomes in randomized clinical trials and beyond; see Cnaan, Laird and Slasor (1997) doi:10.1002/(SICI)1097-0258(19971030)16:20%3C2349::AID-SIM667%3E3.0.CO;2-E for a tutorial and Mallinckrodt, Lane, Schnell, Peng and Mancuso (2008) doi:10.1177/009286150804200402 for a review. This package implements MMRM based on the marginal linear model without random effects using Template Model Builder ('TMB') which enables fast and robust model fitting. Users can specify a variety of covariance matrices, weight observations, fit models with restricted or standard maximum likelihood inference, perform hypothesis testing with Satterthwaite or Kenward-Roger adjustment, and extract least square means estimates by using 'emmeans'.

Changes in 0.3.19

Bug Fixes

  • emmeans() now uses the fitted fixed-effect terms to construct its coefficient basis. This fixes incorrect marginal means and uncertainty estimates for models where the visit variable appears only in interactions, such as treatment-by-visit models without a visit main effect.

Miscellaneous

  • Satterthwaite, empirical and linear Kenward-Roger covariance preparation now skip unused second derivatives. Linear Kenward-Roger also omits the R component and its allocation.
  • Linear Kenward-Roger (vcov = "Kenward-Roger-Linear") now calculates the adjusted coefficient covariance from contracted sums instead of looping over all pairs of covariance parameters. This is substantially faster for models with many covariance parameters, e.g. unstructured covariance with many visits, and gives the same results up to floating-point error. Consequently, the kr_comp element of such fits now contains P and the contracted matrix S_Q, while Q and R are NULL. Full Kenward-Roger fits are unchanged.
  • Kenward-Roger degrees of freedom now use contrast-space matrix contractions and a direct scalar shortcut, preserving the existing formulas while reducing contrast inference time.
  • For one-dimensional Kenward-Roger contrasts whose variance does not depend on the covariance parameters (zero moment), the degrees of freedom are now Inf with F scaling 1, which is the limit of the formulas, instead of NaN.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 21.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-18
  • WARNING12 OK, 1 WARNING2026-07-16
  • OK13 OK2026-06-23
Show 8 earlier changesHide 8 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-20
  • OK13 OK2026-06-12
  • ERROR12 OK, 1 ERROR2026-06-05
  • OK13 OK2026-05-07
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-04-23
  • NOTE11 OK, 3 NOTE2026-04-22
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.3.19
README· In the repository, left out of the releaseVignettesYes · 14 · dynamicNEWSYes · 100% structured · mentions 0.3.19Citation fileNoWebsiteYes · pkgdown
Help pages
130 (108 internal)includes a package overview page
Examples that run
100%15 run in a plain check
Exported functions with examples
73%
Documented parameters
89%
Return-value docs
93%
Help pages citing references
1% with a bibliography file

Downloads

86.4K
CRAN downloads in the past year
Rank #1,416 · ~237/day · ~7.2K/mo
Daily download trend is not available in this view yet.
7.4K30 days
18.8K90 days
86.4K1 year
Compare downloads with other packages →
Also on1K r2u7 autocran1.9K conda_forge78 c2d4u

Repository

161Stars
28Forks
21Open issues
0Open PRs
14Releases
437Commits
30Commit identities
437 commits · Last activity 2026-10-14 · 0% stars, 30d · Discussions: 12 posts
Responsiveness
How these are sampled
PRs merged (all time)
94%
Median days to close, 50 most recently updated closed issues
19
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-09-23 · 1482026-09-12 · 161
PracticesBeta

15 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/openpharma/mmrm on 2026-10-11.

Continuous integration (1)
GitHub Actions
Governance and community (5)
Contributing guideIssue templatesPR templateFundingCODEOWNERS

Funding links: GitHub Sponsors

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-07

pkgdown site last built 2026-10-07

Coverage (1)
Coverage reporting
Show all practicesHide 3 practices
Reproducibility and dev environment (1)
data-raw/
Automation and maintenance (1)
pre-commit
Lint, format, editor (3)
lintrAirRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository has an AI review tool set up.

Review tools
  • Copilot code review
    Commits: some accepting its review suggestions, count not recorded
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
39 external dependencies (excludes base and recommended)

Installing mmrm adds 39 packages (21 with compiled code, 26 MB of source tarballs). Heaviest: stringi 11 MB, Rcpp 1.8 MB, RcppEigen 1.7 MB.

Depends (1)
R >= 4.1
Imports (15)
checkmategenericslifecycleMASSMatrixmethodsnlmeparallelRcppRdpackstatsstringrtibbleTMButils
Enhances (0)
none
Reverse dependencies
5direct
3indirect
Imports 5
Suggested by 8
Show all 13 packagesHide all 13 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (23)
Author, Maintainer since 0.1.3 (2022)
Author · added in 0.3.6
Author · added in 0.3.18
Author · added in 0.3.15
Author · added in 0.3.6
Author
Author · added in 0.3.18
Author · added in 0.3.6
Author · added in 0.3.6
Author · added in 0.3.6
Author
Contributor
Contributor · added in 0.3.14
Copyright holder, Funder · added in 0.3.6
Copyright holder, Funder
Copyright holder, Funder
Copyright holder, Funder
Copyright holder, Funder
Copyright holder, Funder · added in 0.3.13
Releases (17)

Pick two releases to compare their code metrics.

Show 6 earlier eventsHide 6 earlier events
  • 0.3.6
    record
    2023-11-17 · diff ↗ ·
    removed 1 export
    free_cores
    added 6 exports
    as.cov_struct, augment, cov_struct, cov_types, glance, tidy
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.2
    record
    2022-12-20 · diff ↗
  • 0.1.5
    record
    2022-10-18 · diff ↗
  • 0.1.3
    record
    2022-10-18
  • R
    R 4.2.0 released · 2022-04-22
Across CRAN, the median accepted release of the past year spent 19 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2022-10-18
Total releases
17 / 4 yrs
License
Apache License 2.0 OSI
Minimum R
≥ 4.1
Bundled data
126 KB / 3 files
Download size
1.2 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("mmrm")
Sabanes Bove, D., AstraZeneca plc, Boehringer Ingelheim Ltd., F. Hoffmann-La Roche AG, Gilead Sciences, Inc., Merck Sharp & Dohme, Inc., inferential.biostatistics GmbH, Dedic, J., Gower-Page, C., James, D., Jones, J., Kelkhoff, D., Krieger, N. I., Kunzmann, K., Lang, B. M., Leibovitz, D., Li, L., Panagos, A., Sidi, J., Sjoberg, D. D., Stock, C., Wang, Y., & Widmer, L. A. (2026). mmrm: Mixed Models for Repeated Measures (Version 0.3.19) [Computer software]. https://doi.org/10.32614/CRAN.package.mmrm

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 mmrm version 0.3.19 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, 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