Robust Covariance Matrix Estimators
Overview
Object-oriented software for model-robust covariance matrix estimators. Starting out from the basic robust Eicker-Huber-White sandwich covariance methods include: heteroscedasticity-consistent (HC) covariances for cross-section data; heteroscedasticity- and autocorrelation-consistent (HAC) covariances for time series data (such as Andrews' kernel HAC, Newey-West, and WEAVE estimators); clustered covariances (one-way and multi-way); panel and panel-corrected covariances; outer-product-of-gradients covariances; and (clustered) bootstrap covariances. All methods are applicable to (generalized) linear model objects fitted by lm() and glm() but can also be adapted to other classes through S3 methods. Details can be found in Zeileis et al. (2020) doi:10.18637/jss.v095.i01, Zeileis (2004) doi:10.18637/jss.v011.i10 and Zeileis (2006) doi:10.18637/jss.v016.i09.
- Code repository changed from R-Forge to Codeberg at: <https://codeberg.org/zeileis/sandwich/>
- The pkgdown website is now hosted at: <https://zeileis.codeberg.page/sandwich/>
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-14
- NOTE9 OK, 4 NOTE2026-07-11
- OK13 OK2026-06-27
Show 6 earlier changesHide 6 earlier changes
- WARNING12 OK, 1 WARNING2026-06-14
- OK13 OK2026-06-08
- ERROR12 OK, 1 ERROR2026-06-07
- OK14 OK2026-03-27
- ERROR13 OK, 1 ERROR2026-03-25
- OK14 OK2026-03-10
Documentation
- Help pages
- 22
- Examples that run
- 100%21 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 95%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- GitHub only
- Median days to close, 50 most recently updated closed PRs
- GitHub only
Repository codeberg.org/zeileis/sandwich is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.
Dependencies
Installing sandwich adds 1 package (1 with compiled code, 675 KB of source tarballs). Heaviest: zoo 675 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 147 more dependents and 102 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 3.1-3Latest
- 3.1-22026-07-12 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 3.1-12024-09-15 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 3.1-0
- RR 4.3.0 released · 2023-04-21
- 3.0-22022-06-15 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 3.0-12021-05-18 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 3.0-02020-10-02 · diff ↗
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 2.5-12019-04-07 · diff ↗
Show 56 earlier eventsHide 56 earlier events
- 2.5-0
- RR 3.5.0 released · 2018-04-23
- 2.4-02017-07-26 · diff ↗ ·
added 9 exports
vcovCL, meatCL, vcovPL, meatPL, vcovPC, meatPC, vcovBS, vcovBS.default, .vcovBSenv - RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- 2.3-42015-09-24 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 2.3-32015-03-26 · diff ↗
- 2.3-22014-08-24 · diff ↗
- 2.3-12014-07-20 · diff ↗
- RR 3.1.0 released · 2014-04-10
- 2.3-02013-10-05 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 2.2-102013-03-29 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 2.2-9
- RR 2.14.0 released · 2011-10-31
- 2.2-82011-09-28 · diff ↗
- 2.2-72011-06-07 · diff ↗
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- RR 2.11.0 released · 2010-04-22
- 2.2-62010-03-03 · diff ↗
- 2.2-52010-01-15 · diff ↗
- 2.2-42009-12-08 · diff ↗
- 2.2-32009-11-30 · diff ↗
- 2.2-22009-11-18 · diff ↗
- RR 2.10.0 released · 2009-10-26
- RR 2.9.0 released · 2009-04-17
- 2.2-12009-02-05 · diff ↗
- 2.2-0
- RR 2.8.0 released · 2008-10-20
- RR 2.7.0 released · 2008-04-22
- 2.1-02008-01-26 · diff ↗
- 2.0-32007-12-14 · diff ↗
- RR 2.6.0 released · 2007-10-03
- RR 2.5.0 released · 2007-04-24
- 2.0-2
- 2.0-12006-11-17 · diff ↗
- RR 2.4.0 released · 2006-10-03
- 2.0-02006-08-18 · diff ↗ ·
added 18 exports
sandwich, bread, meat, vcovHC, meatHC, vcovHAC, meatHAC, kernHAC, NeweyWest, weave, weightsLumley, weightsAndrews, bwAndrews, bwNeweyWest, estfun, kweights, isoacf, pava.blocks - 1.9-02006-05-24 · diff ↗
- RR 2.3.0 released · 2006-04-24
- 1.1-12006-02-15 · diff ↗
- 1.1-02006-01-19 · diff ↗
- RR 2.2.0 released · 2005-10-06
- RR 2.1.0 released · 2005-04-18
- 1.0-12005-04-06 · diff ↗
- 1.0-02004-12-02 · diff ↗
- 0.9-02004-11-03 · diff ↗
- RR 2.0.0 released · 2004-10-04
- 0.1-32004-07-20 · diff ↗
- RR 1.9.0 released · 2004-04-12
- 0.1-22004-04-08 · diff ↗
- 0.1-12004-02-20
- RR 1.8.0 released · 2003-10-08
Package metadata
- First published
- 2004-02-20
- Total releases
- 40 / 22 yrs
- License
- GPL-2 | GPL-3 OSI
- Minimum R
- ≥ 3.0.0
- Bundled data
- 440 KB / 4 files
- Download size
- 1.4 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("sandwich")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v095.i01, 10.18637/jss.v011.i10, 10.18637/jss.v016.i09.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.