Cluster-Robust (Sandwich) Variance Estimators with Small-Sample Corrections
Overview
Provides several cluster-robust variance estimators (i.e., sandwich estimators) for ordinary and weighted least squares linear regression models, including the bias-reduced linearization estimator introduced by Bell and McCaffrey (2002) https://www150.statcan.gc.ca/n1/pub/12-001-x/2002002/article/9058-eng.pdf and developed further by Pustejovsky and Tipton (2017) DOI:10.1080/07350015.2016.1247004. The package includes functions for estimating the variance- covariance matrix and for testing single- and multiple- contrast hypotheses based on Wald test statistics. Tests of single regression coefficients use Satterthwaite or saddle-point corrections. Tests of multiple- contrast hypotheses use an approximation to Hotelling's T-squared distribution. Methods are provided for a variety of fitted models, including lm() and mlm objects; glm(); geeglm() (from package 'geepack'); lm_robust(), lm_lin(), and iv_robust() (from package 'estimatr'); ivreg() (from package 'AER'); ivreg() (from package 'ivreg' when estimated by ordinary least squares); plm() (from package 'plm'); gls() and lme() (from 'nlme'); lmer() (from `lme4`); robu() (from 'robumeta'); rma.uni() and rma.mv() (from 'metafor'); and mmrm() (from 'mmrm').
- Added support for
mmrm::mmrm()models. - Added support for
estimatr::iv_robust()models. - Fixed bug in internal function
get_data()introduced by changes in error message structure in R-devel.
From NEWS.md in the release
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: clubSandwich/R/mlm.R (.Dimnames: 2) '.Dimnames' should be changed to 'dimnames'.
- NOTE8 OK, 5 NOTENow
- NOTE11 OK, 2 NOTE2026-07-16
- OK13 OK2026-05-06
- ERROR13 OK, 1 ERROR2026-04-23
- OK14 OK2026-03-10
Documentation
- Help pages
- 28
- Examples that run
- 100%24 run in a plain check (14 of them under a condition)
- Exported functions with examples
- 100%
- Documented parameters
- 96%
- Return-value docs
- 100%
- Help pages citing references
- 18%
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 15
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
8 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/jepusto/clubsandwich on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-05-04 · The repository has a site deploy workflow
pkgdown site last built 2026-05-04
Show all practicesHide 1 practice
Dependencies
Installing clubSandwich adds 5 packages (3 with compiled code, 3.5 MB of source tarballs). Heaviest: sandwich 1.4 MB, rlang 766 KB, zoo 675 KB.
Show all 27 packagesHide all 27 packages
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.7.0Latest
- RR 4.6.0 released · 2026-04-24
- 0.6.22026-02-02 · diff ↗
- 0.6.12025-07-30 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.6.02025-04-01 · diff ↗
- 0.5.112024-06-20 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.5.102023-07-20 · diff ↗
- 0.5.92023-07-12 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.5.82022-08-15 · diff ↗
- 0.5.72022-06-15 · diff ↗
- 0.5.62022-04-23 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.5.5
Show 27 earlier eventsHide 27 earlier events
- 0.5.4
- RR 4.1.0 released · 2021-05-18
- 0.5.32021-01-24 · diff ↗
- unarchivedReturned to CRAN2020-11-14
- 0.5.22020-11-14 · diff ↗
- archivedRemoved from CRAN2020-10-27check problems were not corrected in time ATLAS
- 0.5.1
- unarchivedReturned to CRAN2020-09-01
- 0.5.0
- archivedRemoved from CRAN2020-08-06check problems were not corrected despite reminders MKL, no long doubles
- 0.4.22020-07-23 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.4.12020-01-28 · diff ↗
- 0.4.02019-12-18 · diff ↗
- 0.3.52019-05-14 · diff ↗
- 0.3.42019-05-11 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.3.32019-01-24 · diff ↗
- 0.3.2
- RR 3.5.0 released · 2018-04-23
- 0.3.12018-04-04 · diff ↗
- 0.3.02017-11-13 · diff ↗
- 0.2.3
- RR 3.4.0 released · 2017-04-21
- 0.2.22016-12-01 · diff ↗
- 0.2.12016-07-23
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2016-07-23
- Total releases
- 28 / 10 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.0.0
- Bundled data
- 160 KB / 4 files
- Download size
- 372 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("clubSandwich")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.