sandwich: Robust Covariance Matrix Estimators

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>.

Version: 3.1-0
Depends: R (≥ 3.0.0)
Imports: stats, utils, zoo
Suggests: AER, car, geepack, lattice, lme4, lmtest, MASS, multiwayvcov, parallel, pcse, plm, pscl, scatterplot3d, stats4, strucchange, survival
Published: 2023-12-11
DOI: 10.32614/CRAN.package.sandwich
Author: Achim Zeileis ORCID iD [aut, cre], Thomas Lumley ORCID iD [aut], Nathaniel Graham ORCID iD [ctb], Susanne Koell [ctb]
Maintainer: Achim Zeileis <Achim.Zeileis at>
License: GPL-2 | GPL-3
NeedsCompilation: no
Citation: sandwich citation info
Materials: README NEWS
In views: Econometrics, Finance, Robust
CRAN checks: sandwich results


Reference manual: sandwich.pdf
Vignettes: Various Versatile Variances: An Object-Oriented Implementation of Clustered Covariances in R
Object-Oriented Computation of Sandwich Estimators
Econometric Computing with HC and HAC Covariance Matrix Estimators


Package source: sandwich_3.1-0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): sandwich_3.1-0.tgz, r-oldrel (arm64): sandwich_3.1-0.tgz, r-release (x86_64): sandwich_3.1-0.tgz, r-oldrel (x86_64): sandwich_3.1-0.tgz
Old sources: sandwich archive

Reverse dependencies:

Reverse depends: AER, CADFtest, cjoint, COUNT, dhglm, DiDforBigData, evian, gfunctions, gKRLS, gmm, iClick, list, mediation, merDeriv, mfx, midasr, momentfit, PeerPerformance, prais, RcmdrMisc, rdd, strucchange, strucchangeRcpp, vars
Reverse imports: adventr, aldvmm, ardl.nardl, autostsm, bayesdistreg, beeca, betareg, BFpack, binsreg, causalOT, causalSLSE, censReg, chantrics, clubSandwich, clusterSEs, cmprskcoxmsm, contrast, ConvergenceClubs, crch, cregg, crseEventStudy, crwbmetareg, DChaos, ddecompose, DIDmultiplegtDYN, DirectEffects, dLagM, drcte, eventglm, ExactMed, facmodTS, fglsnet, FindIt, fixest, funtimes, fxregime, GCCfactor, gcmr, GenericML, GLMpack, glmx, glogis, gravity, Greg, grf, GVARX, GWASTools, HDTSA, highfrequency, interflex, invacost, IOLS, ivdoctr, lavaSearch2, lax, lfe, lineartestr, lite, lmw, lpirfs, maczic, matchMulti, maxLik, medflex, memochange, mhurdle, micsr, mixl, mlt, model4you, ModTools, monotonicity, MRTAnalysis, multcomp, multiwayvcov, mzipmed, nonnest2, NormData, npcp, nse, oesr, OOS, optic, outreg, party, PlackettLuce, plm, PointFore, pubh, quickmatch, radiant.model, Rchoice, RCreliability, RCT2, rddapp, rddtools, rdlocrand, refitME, regmedint, regtools, RESI, rifreg, rigr, risks, rqlm, sampcompR, scDIFtest, semtree, sfaR, singleRcapture, slm, sovereign, SpatialRDD, ssym, StackImpute, systemfit, tbm, tradepolicy, trajmsm, tram, tramicp, tramnet, TrialEmulation, trtf, tsdistributions, tsgarch, vcrpart, weibulltools, wildmeta
Reverse suggests: ANOM, ARDL, broom, car, chandwich, clarify, dce, ddml, dfadjust, DoubleML, dyn, dynlm, emmeans, estimatr, finalfit, FinTS, fwb, geex, getspanel, ggeffects, gtsummary, healthequal, HSAUR2, HSAUR3, huxtable, insight, interactions, ivreg, jtools, lmtest, madness, marginaleffects, margins, MarkowitzR, MatchIt, memisc, miceadds, mlt.docreg, modelsummary, modmarg, panelr, parameters, parglms, partykit, performance, pscl, psychotools, psycModel, rineq, riskCommunicator, SGDinference, SharpeR, SimEngine, sjPlot, skedastic, sketching, spatialreg, StratifiedMedicine, summclust, tangram, texreg, tidyfit, tstests, tukeytrend, WeightIt, wpa


Please use the canonical form to link to this page.