IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v016i09.html
   My bibliography  Save this article

Object-oriented Computation of Sandwich Estimators

Author

Listed:
  • Zeileis, Achim

Abstract

Sandwich covariance matrix estimators are a popular tool in applied regression modeling for performing inference that is robust to certain types of model misspecification. Suitable implementations are available in the R system for statistical computing for certain model fitting functions only (in particular lm()), but not for other standard regression functions, such as glm(), nls(), or survreg(). Therefore, conceptual tools and their translation to computational tools in the package sandwich are discussed, enabling the computation of sandwich estimators in general parametric models. Object orientation can be achieved by providing a few extractor functions' most importantly for the empirical estimating functions' from which various types of sandwich estimators can be computed.

Suggested Citation

  • Zeileis, Achim, 2006. "Object-oriented Computation of Sandwich Estimators," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 16(i09).
  • Handle: RePEc:jss:jstsof:v:016:i09
    DOI: http://hdl.handle.net/10.18637/jss.v016.i09
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v016i09/v16i09.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v016i09/sandwich_2.0-0.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v016i09/DebTrivedi.rda.gz
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v016.i09?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Cribari-Neto, Francisco, 2004. "Asymptotic inference under heteroskedasticity of unknown form," Computational Statistics & Data Analysis, Elsevier, vol. 45(2), pages 215-233, March.
    2. Whitney K. Newey & Kenneth D. West, 1994. "Automatic Lag Selection in Covariance Matrix Estimation," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 61(4), pages 631-653.
    3. T. Lumley & P. Heagerty, 1999. "Weighted empirical adaptive variance estimators for correlated data regression," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 61(2), pages 459-477, April.
    4. White,Halbert, 1996. "Estimation, Inference and Specification Analysis," Cambridge Books, Cambridge University Press, number 9780521574464.
    5. Fair, Ray C, 1978. "A Theory of Extramarital Affairs," Journal of Political Economy, University of Chicago Press, vol. 86(1), pages 45-61, February.
    6. Andrews, Donald W K, 1991. "Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation," Econometrica, Econometric Society, vol. 59(3), pages 817-858, May.
    7. Cameron,A. Colin & Trivedi,Pravin K., 2005. "Microeconometrics," Cambridge Books, Cambridge University Press, number 9780521848053, September.
    8. Deb, Partha & Trivedi, Pravin K, 1997. "Demand for Medical Care by the Elderly: A Finite Mixture Approach," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 12(3), pages 313-336, May-June.
    9. Zeileis, Achim, 2004. "Econometric Computing with HC and HAC Covariance Matrix Estimators," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 11(i10).
    10. Kiefer, Nicholas M. & Vogelsang, Timothy J., 2002. "Heteroskedasticity-Autocorrelation Robust Testing Using Bandwidth Equal To Sample Size," Econometric Theory, Cambridge University Press, vol. 18(6), pages 1350-1366, December.
    11. MacKinnon, James G. & White, Halbert, 1985. "Some heteroskedasticity-consistent covariance matrix estimators with improved finite sample properties," Journal of Econometrics, Elsevier, vol. 29(3), pages 305-325, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. repec:jss:jstsof:16:i09 is not listed on IDEAS
    2. Zeileis, Achim, 2004. "Econometric Computing with HC and HAC Covariance Matrix Estimators," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 11(i10).
    3. repec:jss:jstsof:11:i10 is not listed on IDEAS
    4. Ding, Peng, 2021. "The Frisch–Waugh–Lovell theorem for standard errors," Statistics & Probability Letters, Elsevier, vol. 168(C).
    5. Hartigan, Luke, 2018. "Alternative HAC covariance matrix estimators with improved finite sample properties," Computational Statistics & Data Analysis, Elsevier, vol. 119(C), pages 55-73.
    6. Zeileis, Achim, 2006. "Implementing a class of structural change tests: An econometric computing approach," Computational Statistics & Data Analysis, Elsevier, vol. 50(11), pages 2987-3008, July.
    7. Fruehwirt, Wolfgang & Hochfilzer, Leonhard & Weydemann, Leonard & Roberts, Stephen, 2021. "Cumulation, crash, coherency: A cryptocurrency bubble wavelet analysis," Finance Research Letters, Elsevier, vol. 40(C).
    8. Preinerstorfer, David & Pötscher, Benedikt M., 2016. "On Size And Power Of Heteroskedasticity And Autocorrelation Robust Tests," Econometric Theory, Cambridge University Press, vol. 32(2), pages 261-358, April.
    9. James G. MacKinnon, 2012. "Thirty Years Of Heteroskedasticity-robust Inference," Working Paper 1268, Economics Department, Queen's University.
    10. Jochen Heberle & Cristina Sattarhoff, 2017. "A Fast Algorithm for the Computation of HAC Covariance Matrix Estimators," Econometrics, MDPI, vol. 5(1), pages 1-16, January.
    11. Lucio Capitani & Leo Pasquazzi, 2015. "Inference for performance measures for financial assets," METRON, Springer;Sapienza Università di Roma, vol. 73(1), pages 73-98, April.
    12. Preinerstorfer, David, 2014. "Finite Sample Properties of Tests Based on Prewhitened Nonparametric Covariance Estimators," MPRA Paper 58333, University Library of Munich, Germany.
    13. Peng Ding, 2020. "The Frisch--Waugh--Lovell Theorem for Standard Errors," Papers 2009.06621, arXiv.org.
    14. Masaru Chiba, 2023. "Robust and efficient specification tests in Markov-switching autoregressive models," Statistical Inference for Stochastic Processes, Springer, vol. 26(1), pages 99-137, April.
    15. Cheng, Tsung-Chi, 2012. "On simultaneously identifying outliers and heteroscedasticity without specific form," Computational Statistics & Data Analysis, Elsevier, vol. 56(7), pages 2258-2272.
    16. Zeileis, Achim & Kleiber, Christian & Jackman, Simon, 2008. "Regression Models for Count Data in R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i08).
    17. Christian A. Vossler, 2013. "Analyzing repeated-game economics experiments: robust standard errors for panel data with serial correlation," Chapters, in: John A. List & Michael K. Price (ed.), Handbook on Experimental Economics and the Environment, chapter 3, pages 89-112, Edward Elgar Publishing.
    18. Pötscher, Benedikt M. & Preinerstorfer, David, 2017. "Further Results on Size and Power of Heteroskedasticity and Autocorrelation Robust Tests, with an Application to Trend Testing," MPRA Paper 81053, University Library of Munich, Germany.
    19. Kim, Min Seong & Sun, Yixiao & Yang, Jingjing, 2017. "A fixed-bandwidth view of the pre-asymptotic inference for kernel smoothing with time series data," Journal of Econometrics, Elsevier, vol. 197(2), pages 298-322.
    20. Romano, Joseph P. & Wolf, Michael, 2017. "Resurrecting weighted least squares," Journal of Econometrics, Elsevier, vol. 197(1), pages 1-19.
    21. Hong, Yongmiao & Linton, Oliver & McCabe, Brendan & Sun, Jiajing & Wang, Shouyang, 2024. "Kolmogorov–Smirnov type testing for structural breaks: A new adjusted-range based self-normalization approach," Journal of Econometrics, Elsevier, vol. 238(2).
    22. Casini, Alessandro, 2023. "Theory of evolutionary spectra for heteroskedasticity and autocorrelation robust inference in possibly misspecified and nonstationary models," Journal of Econometrics, Elsevier, vol. 235(2), pages 372-392.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:016:i09. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.