Estimated Marginal Means, aka Least-Squares Means
Overview
Obtain estimated marginal means (EMMs) for many linear, generalized linear, and mixed models. Compute contrasts or linear functions of EMMs, trends, and comparisons of slopes. Plots and other displays. Least-squares means are discussed, and the term "estimated marginal means" is suggested, in Searle, Speed, and Milliken (1980) Population marginal means in the linear model: An alternative to least squares means, The American Statistician 34(4), 216-221 doi:10.1080/00031305.1980.10483031.
- Updated logo (now hexagonal)
- bug-fix for labelling in pairwise contrasts
head()andtail()foremmGridobjects now follow base-R semantics for a negativen(previously the two were effectively swapped)- Fixed an error in the
atanhresponse transformation: a typo in itsmu.etaderivative (tanh^2(eta)) madetype = "response"fail cross.adjustis now correctly ignored (as documented) when thebygroups are not all the same size, rather than silently producing mis-shaped (recycled) adjusted P valuesemmip(..., engine = "lattice")now uses the axis/trace labels again (a typo referenced the wrong object, so the labels were silently dropped)- Bug fix regarding cls class assignment
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
- 46includes a package overview page
- Examples that run
- 98%42 run in a plain check (4 of them under a condition) · 1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 83%
- Return-value docs
- 93%
- Help pages citing references
- 9%
Downloads
Repository
- PRs merged (all time)
- 76%
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
Commit identities over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/rvlenth/emmeans on 2026-10-11.
GitHub Pages site last deployed 2026-10-09 · The repository has a site deploy workflow
pkgdown site last built 2026-10-09
Dependencies
Installing emmeans adds 4 packages (2 with compiled code, 2.1 MB of source tarballs). Heaviest: mvtnorm 1.0 MB, rlang 766 KB, estimability 292 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 10 more dependents and 73 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Show 4 more contributorsHide 4 contributors
Previously maintained by Russell V. Lenth (0.9 to 1.11.2-8).
Pick two releases to compare their code metrics.
- 2.0.4Latest
- RR 4.6.0 released · 2026-04-24
- 2.0.32026-04-09 · diff ↗
- 2.0.22026-03-05 · diff ↗
- 2.0.12025-12-16 · diff ↗
- 2.0.02025-10-29 · diff ↗
- 1.11.2-8
- 1.11.22025-07-11 · diff ↗
- 1.11.1
- RR 4.5.0 released · 2025-04-11
- 1.11.0
- 1.10.72025-01-31 · diff ↗
- 1.10.6
- 1.10.5
- 1.10.4
- 1.10.32024-07-01 · diff ↗
Show 67 earlier eventsHide 67 earlier events
- 1.10.22024-05-20 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.10.12024-04-06 · diff ↗ ·
added 13 exports
consec.emmc, del.eff.emmc, dunnett.emmc, eff.emmc, mean_chg.emmc, pairwise.emmc, poly.emmc, revpairwise.emmc, trt.vs.ctrl.emmc, trt.vs.ctrl1.emmc, trt.vs.ctrlk.emmc, tukey.emmc, wtcon.emmc - 1.10.02024-01-24 · diff ↗
- 1.9.02023-12-18 · diff ↗
- 1.8.9
- 1.8.82023-08-17 · diff ↗
- 1.8.72023-06-23 · diff ↗
- 1.8.62023-05-12 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.8.52023-03-08 · diff ↗
- 1.8.4-12023-01-17 · diff ↗ ·
removed 2 exports
.zi.simulate, I_betadded 4 exports
.hurdle.support, .zi.support, inverse, permute_levels - 1.8.32022-12-06 · diff ↗
- 1.8.22022-10-28 · diff ↗
- 1.8.1-1
- 1.8.02022-08-05 · diff ↗ ·
removed 5 exports
pmm, pmmeans, pmmip, pmmobj, pmtrendsadded 2 exports
meanint, symmint - 1.7.52022-06-22 · diff ↗ ·
added 4 exports
I_bet, as.mcmc.emm_list, as.mcmc.list.emmGrid, as.mcmc.list.emm_list - 1.7.4-1
- RR 4.2.0 released · 2022-04-22
- 1.7.32022-03-27 · diff ↗
- 1.7.22022-01-04 · diff ↗
- 1.7.1-12021-11-29 · diff ↗
- 1.7.0
- 1.6.32021-08-20 · diff ↗
- 1.6.2-1
- 1.6.12021-06-01 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.6.02021-04-24 · diff ↗
- 1.5.5-12021-03-21 · diff ↗
- 1.5.42021-02-03 · diff ↗
- 1.5.3
- 1.5.2-12020-10-25 · diff ↗
- 1.5.22020-10-24 · diff ↗
- 1.5.12020-09-18 · diff ↗
- 1.5.0
- 1.4.82020-06-26 · diff ↗
- 1.4.72020-05-25 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.4.6
- 1.4.52020-03-04 · diff ↗
- 1.4.4
- 1.4.3.012019-11-28 · diff ↗
- 1.4.32019-11-26 · diff ↗
- 1.4.2
- 1.4.12019-09-12 · diff ↗
- 1.4
- 1.3.5.12019-06-26 · diff ↗
- 1.3.5
- RR 3.6.0 released · 2019-04-26
- 1.3.4
- 1.3.32019-03-02 · diff ↗
- 1.3.2
- 1.3.12018-12-14 · diff ↗
- 1.3.02018-10-26 · diff ↗ ·
removed 3 exports
lsm.basis, recover.data, ref.gridadded 2 exports
.emm_basis, .recover_data - 1.2.4
- 1.2.32018-07-18 · diff ↗ ·
removed 4 exports
as.mcmc.list.emmGrid, glht.emmGrid, glht.emmlf, modelparm.emmwrapadded 1 export
CLD - 1.2.22018-06-26 · diff ↗ ·
added 6 exports
.std.link.labels, as.mcmc.emmGrid, as.mcmc.list.emmGrid, glht.emmGrid, glht.emmlf, modelparm.emmwrap - 1.2.12018-05-21 · diff ↗
- 1.2
- RR 3.5.0 released · 2018-04-23
- 1.1.32018-04-01 · diff ↗
- 1.1.22018-02-24 · diff ↗
- 1.1
- 1.0
- 0.9.12017-11-05 · diff ↗
- 0.92017-10-20
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-10-20
- Total releases
- 73 / 9 yrs
- License
- GPL-2 | GPL-3 OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 4.9 KB / 9 files
- Download size
- 1.7 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("emmeans")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-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.