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

Econometric Computing with HC and HAC Covariance Matrix Estimators

Author

Listed:
  • Zeileis, Achim

Abstract

Data described by econometric models typically contains autocorrelation and/or heteroskedasticity of unknown form and for inference in such models it is essential to use covariance matrix estimators that can consistently estimate the covariance of the model parameters. Hence, suitable heteroskedasticity consistent (HC) and heteroskedasticity and autocorrelation consistent (HAC) estimators have been receiving attention in the econometric literature over the last 20 years. To apply these estimators in practice, an implementation is needed that preferably translates the conceptual properties of the underlying theoretical frameworks into computational tools. In this paper, such an implementation in the package sandwich in the R system for statistical computing is described and it is shown how the suggested functions provide reusable components that build on readily existing functionality and how they can be integrated easily into new inferential procedures or applications. The toolbox contained in sandwich is extremely flexible and comprehensive, including specific functions for the most important HC and HAC estimators from the econometric literature. Several real-world data sets are used to illustrate how the functionality can be integrated into applications.

Suggested Citation

  • Zeileis, Achim, 2004. "Econometric Computing with HC and HAC Covariance Matrix Estimators," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 11(i10).
  • Handle: RePEc:jss:jstsof:v:011:i10
    DOI: http://hdl.handle.net/10.18637/jss.v011.i10
    as

    Download full text from publisher

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

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v011i10/v11i10.R.zip
    Download Restriction: no

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

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v011.i10?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. Christian Kleiber & Achim Zeileis, 2005. "Validating multiple structural change models-a case study," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 20(5), pages 685-690.
    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. Kleiber Christian & Zeileis Achim, 2010. "The Grunfeld Data at 50," German Economic Review, De Gruyter, vol. 11(4), pages 404-417, December.
    2. A. Yalta & A. Yalta, 2010. "Should Economists Use Open Source Software for Doing Research?," Computational Economics, Springer;Society for Computational Economics, vol. 35(4), pages 371-394, April.
    3. DIMA, Bogdan & DIMA, Ştefana Maria & IOAN, Roxana, 2021. "Remarks on the behaviour of financial market efficiency during the COVID-19 pandemic. The case of VIX," Finance Research Letters, Elsevier, vol. 43(C).
    4. repec:jss:jstsof:11:i10 is not listed on IDEAS
    5. Aboura, Sofiane & Chevallier, Julien, 2013. "Leverage vs. feedback: Which Effect drives the oil market?," Finance Research Letters, Elsevier, vol. 10(3), pages 131-141.
    6. Kholodilin Konstantin Arkadievich & Siliverstovs Boriss, 2006. "On the Forecasting Properties of the Alternative Leading Indicators for the German GDP: Recent Evidence," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 226(3), pages 234-259, June.
    7. Yalta, A. Talha & Jenal, Olaf, 2009. "On the importance of verifying forecasting results," International Journal of Forecasting, Elsevier, vol. 25(1), pages 62-73.
    8. Fabio Clementi & Marco Gallegati & Mauro Gallegati, 2015. "Growth and Cycles of the Italian Economy Since 1861: The New Evidence," Italian Economic Journal: A Continuation of Rivista Italiana degli Economisti and Giornale degli Economisti, Springer;Società Italiana degli Economisti (Italian Economic Association), vol. 1(1), pages 25-59, March.
    9. repec:bla:germec:v:11:y:2010:i::p:404-417 is not listed on IDEAS
    10. Han Lin Shang & Jiguo Cao & Peijun Sang, 2022. "Stopping time detection of wood panel compression: A functional time‐series approach," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 71(5), pages 1205-1224, November.
    11. Greyling, Jan & Pardey, Philip G. & Senay, Senait, 2023. "Distortionary Agricultural Policies: Their Productivity, Location and Climate Variability Implications for South Africa During the 20th Century," Staff Papers 330158, University of Minnesota, Department of Applied Economics.
    12. Ross Sparks & Tim Keighley & David Muscatello, 2010. "Early warning CUSUM plans for surveillance of negative binomial daily disease counts," Journal of Applied Statistics, Taylor & Francis Journals, vol. 37(11), pages 1911-1929.
    13. Castelnuovo, Efrem, 2010. "Tracking U.S. inflation expectations with domestic and global indicators," Journal of International Money and Finance, Elsevier, vol. 29(7), pages 1340-1356, November.
    14. Lindmark, Magnus & Acar, Sevil, 2013. "Sustainability in the making? A historical estimate of Swedish sustainable and unsustainable development 1850–2000," Ecological Economics, Elsevier, vol. 86(C), pages 176-187.
    15. González Andrés & Teräsvirta Timo, 2008. "Modelling Autoregressive Processes with a Shifting Mean," Studies in Nonlinear Dynamics & Econometrics, De Gruyter, vol. 12(1), pages 1-28, March.
    16. Yalta, A. Talha, 2007. "The Numerical Reliability of GAUSS 8.0," The American Statistician, American Statistical Association, vol. 61, pages 262-268, August.
    17. Baumöhl, Eduard & Výrost, Tomáš & Lyócsa, Štefan, 2011. "Are we able to capture the EU debt crisis? Evidence from PIIGGS countries in panel unit root framework," MPRA Paper 30334, University Library of Munich, Germany.
    18. Ignacio Díaz-Emparanza & Petr Mariel & María Victoria Esteban (ed.), 2009. "Econometrics with gretl. Proceedings of the gretl Conference 2009," UPV/EHU Books, Universidad del País Vasco - Facultad de Ciencias Económicas y Empresariales, edition 1, number 01, June.
    19. Richard G. Anderson & William H. Greene & Bruce D. McCullough & Hrishikesh D. Vinod, 2005. "The role of data & program code archives in the future of economic research," Working Papers 2005-014, Federal Reserve Bank of St. Louis.
    20. Gawon Yoon, 2009. "Corrigendum to “Regime Changes in International Real Interest Rates: Are They a Monetary Phenomenon?”," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 41(5), pages 1031-1032, August.
    21. Yoon, Gawon, 2009. "Is high real interest rate persistence an intrinsic characteristic of industrialized economies?," Economic Modelling, Elsevier, vol. 26(2), pages 359-363, March.
    22. A. Talha Yalta & A. Yasemin Yalta, 2009. "Wilkinson Tests and gretl," EHUCHAPS, in: Ignacio Díaz-Emparanza & Petr Mariel & María Victoria Esteban (ed.), Econometrics with gretl. Proceedings of the gretl Conference 2009, edition 1, chapter 16, pages 243-251, Universidad del País Vasco - Facultad de Ciencias Económicas y Empresariales.

    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:011:i10. 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.