Least-Squares Means
Overview
Obtain least-squares means for linear, generalized linear, and mixed models. Compute contrasts or linear functions of least-squares means, and comparisons of slopes. Plots and compact letter displays. Least-squares means were proposed in Harvey, W (1960) "Least-squares analysis of data with unequal subclass numbers", Tech Report ARS-20-8, USDA National Agricultural Library, and discussed further 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. NOTE: lsmeans now relies primarily on code in the 'emmeans' package. 'lsmeans' will be archived in the near future.
Fixed documentation links to emmeans help pages
Removed datasets that are duplicated from 'emmeans'
From inst/NEWS in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 4includes a package overview page
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 50%
Downloads
Dependencies
Installing lsmeans adds 5 packages (2 with compiled code, 3.8 MB of source tarballs). Heaviest: emmeans 1.7 MB, mvtnorm 1.0 MB, rlang 766 KB.
Code & Tests
People & History
Maintainer since 0.9 (2012)
Show 5 peopleHide 5 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 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
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 3.0.3Latest2014-03-02 · current release · diff ↗ ·
removed 1 export
pattern:^[[:alpha:]]+added 15 exports
cld, pattern:*.lsmc, as.glht, contrast, lsm, lsm.basis, lsmeans, lsmeans.character, lsmip, lstrends, nonest.basis, recover.data, ref.grid, test, .old.lsmeans - 3.0.22013-07-19 · diff ↗
- 2.30-22025-03-24 · diff ↗
Show 49 earlier eventsHide 49 earlier events
- 2.30-02018-11-03 · diff ↗ ·
removed 28 exports
cld, as.stanfit, pattern:*.lsmc, add_grouping, as.glht, defaults.lsm, get.lsm.option, get.pmm.option, lsm, lsmeans.character, lsmobj, lsmip, lsm.options, lstrends, make.tran, pmm, pmmeans, pmmobj, pmmip, pmm.options, pmtrends, regrid, test, .all.vars, .aovlist.dffun, .diag, .get.offset, .my.vcov - 2.27-622018-05-11 · diff ↗
- 2.27-612017-11-05 · diff ↗
- 2.27-60
- 2.27-22017-08-28 · diff ↗
- 2.26-3
- 2.25-52017-03-09 · diff ↗
- 2.252016-11-19 · diff ↗
- 2.242016-10-21 · diff ↗
- 2.23-52016-07-18 · diff ↗
- 2.23
- 2.22-12016-02-07 · diff ↗
- 2.222016-01-26 · diff ↗
- 2.21-12015-12-17 · diff ↗
- 2.212015-12-04 · diff ↗ ·
removed 2 exports
All.vars, rbindadded 11 exports
get.pmm.option, pmm, pmmeans, pmmobj, pmmip, pmm.options, pmtrends, .all.vars, .diag, .get.offset, .my.vcov - 2.20-23
- 2.20-2
- 2.202015-08-29 · diff ↗
- 2.19
- 2.182015-06-01 · diff ↗
- 2.17
- 2.162015-03-14 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 2.15.32013-02-13 · diff ↗
- 2.15.22012-10-19 · diff ↗
- 2.15
- 2.14
- 2.13
- 2.12
- 2.112014-07-31 · diff ↗
- 2.102014-06-25 · diff ↗
- 2.05
- 2.00-52014-04-10 · diff ↗
- 2.00-42014-03-24 · diff ↗
- 2.00-12014-03-03 · diff ↗
- 1.10-42013-12-04 · diff ↗
- 1.10-32013-11-29 · diff ↗
- 1.10-22013-09-30 · diff ↗
- 1.10-012013-07-19 · diff ↗
- 1.10-002013-07-04 · diff ↗
- 1.06-062013-06-14 · diff ↗
- 1.06-052013-02-14 · diff ↗
- 1.05-012012-12-05 · diff ↗
- 1.05-002012-11-02 · diff ↗
- 1.00-002012-10-19 · diff ↗
- 0.99-802012-09-20 · diff ↗
- 0.992012-08-27 · diff ↗
- 0.92012-08-15
- RR 2.15.0 released · 2012-03-30
Package metadata
- First published
- 2012-08-15
- Total releases
- 50 / 14 yrs
- License
- GPL-2 | GPL-3 OSI
- Minimum R
- ≥ 3.2
- Download size
- 16 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("lsmeans")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v069.i01.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.