Skip to content

sandwich

3.1-3

Robust Covariance Matrix Estimators

283packages depend
3.1Mdownloads / year
21.2%test coverage
13/13checks pass

Overview

About
Maintained by Achim ZeileisFirst published 2004-02-2040 releasesCRAN page ↗Codeberg ↗

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.

Install

Health

CRAN checks
13OK
Slowest check: 4.5 min · r-release-macos-x86_64
Code health
Yes
Tests · ratio 0.75
21.2%
Coverage · measured lines
100%
Documentation · exports
3
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-07-14
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-07-11
    9 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-27
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 6 earlier snapshots
  • WARNING2026-06-14
    12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-08
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-07
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-27
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-25
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 153 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
97%
Return-value docs
100%
References docs
95%

Downloads

3.1M
CRAN downloads in the past year
Rank #209 · ~8.4K/day · ~256.1K/mo
Daily download trend is not available in this view yet.
238K30 days
765.8K90 days
3.1M1 year
Compare downloads with other packages →
Also on20.7K r2u192 autocran110.3K conda_forge1.8K c2d4u

Repository

Repository practices

Upstream repositoryBeta

Repository codeberg.org/zeileis/sandwich is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.

How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.0.0
Imports (3)
statsutilszoo
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

Datasets

People & History

People (4)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Contributors (2)
Contributor · added in 2.4-0
Contributor · added in 3.0-0
Listed in earlier versions (1)
no longer listed · 2.4-0 to 2.5-1
Package Timeline

40 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 3.1-3Latest
    2026-08-03 · current release · diff ↗
  • 3.1-2
    2026-07-12 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 3.1-1
    2024-09-15 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 3.1-0
    2023-12-11 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 3.0-2
    2022-06-15 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 3.0-1
    2021-05-18 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 3.0-0
    2020-10-02 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 2.5-1
    2019-04-07 · diff ↗
Show 56 earlier events
  • 2.5-0
    2018-08-17 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 2.4-0
    2017-07-26 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • 2.3-4
    2015-09-24 · diff ↗
  • R
    R 3.2.0 released · 2015-04-16
  • 2.3-3
    2015-03-26 · diff ↗
  • 2.3-2
    2014-08-24 · diff ↗
  • 2.3-1
    2014-07-20 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 2.3-0
    2013-10-05 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 2.2-10
    2013-03-29 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 2.2-9
    2012-01-14 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 2.2-8
    2011-09-28 · diff ↗
  • 2.2-7
    2011-06-07 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • R
    R 2.12.0 released · 2010-10-15
  • R
    R 2.11.0 released · 2010-04-22
  • 2.2-6
    2010-03-03 · diff ↗
  • 2.2-5
    2010-01-15 · diff ↗
  • 2.2-4
    2009-12-08 · diff ↗
  • 2.2-3
    2009-11-30 · diff ↗
  • 2.2-2
    2009-11-18 · diff ↗
  • R
    R 2.10.0 released · 2009-10-26
  • R
    R 2.9.0 released · 2009-04-17
  • 2.2-1
    2009-02-05 · diff ↗
  • 2.2-0
    2008-12-19 · diff ↗
  • R
    R 2.8.0 released · 2008-10-20
  • R
    R 2.7.0 released · 2008-04-22
  • 2.1-0
    2008-01-26 · diff ↗
  • 2.0-3
    2007-12-14 · diff ↗
  • R
    R 2.6.0 released · 2007-10-03
  • R
    R 2.5.0 released · 2007-04-24
  • 2.0-2
    2007-04-14 · diff ↗
  • 2.0-1
    2006-11-17 · diff ↗
  • R
    R 2.4.0 released · 2006-10-03
  • 2.0-0
    2006-08-18 · diff ↗
  • 1.9-0
    2006-05-24 · diff ↗
  • R
    R 2.3.0 released · 2006-04-24
  • 1.1-1
    2006-02-15 · diff ↗
  • 1.1-0
    2006-01-19 · diff ↗
  • R
    R 2.2.0 released · 2005-10-06
  • R
    R 2.1.0 released · 2005-04-18
  • 1.0-1
    2005-04-06 · diff ↗
  • 1.0-0
    2004-12-02 · diff ↗
  • 0.9-0
    2004-11-03 · diff ↗
  • R
    R 2.0.0 released · 2004-10-04
  • 0.1-3
    2004-07-20 · diff ↗
  • R
    R 1.9.0 released · 2004-04-12
  • 0.1-2
    2004-04-08 · diff ↗
  • 0.1-1
    2004-02-20
  • R
    R 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
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("sandwich")
Zeileis, A., Graham, N., Koell, S., & Lumley, T. (2026). sandwich: Robust Covariance Matrix Estimators (Version 3.1-3) [Computer software]. https://doi.org/10.32614/CRAN.package.sandwich

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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 sandwich version 3.1-3 [Data set]. HJJB, LLC. Data release v2026-08-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-18, 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