IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v18y2018i4p951-980.html
   My bibliography  Save this article

Heteroskedasticity- and autocorrelation-robust F and t tests in Stata

Author

Listed:
  • Xiaoqing Ye

    (South-Central University for Nationalities)

  • Yixiao Sun

    (University of California, San Diego)

Abstract

In this article, we consider time-series, ordinary least-squares, and instrumental-variable regressions and introduce a new pair of commands, har and hart, that implement more accurate heteroskedasticity- and autocorrelation- robust (HAR) F and t tests. These tests represent part of the recent progress on HAR inference. The F and t tests are based on the convenient F and t ap- proximations and are more accurate than the conventional chi-squared and normal approximations. The underlying smoothing parameters are selected to target the type I and type II errors, which are the two fundamental objects in every hypoth- esis testing problem. The estimation command har and the postestimation test command hart allow for both kernel HAR variance estimators and orthonormal- series HAR variance estimators. In addition, we introduce another pair of new commands, gmmhar and gmmhart, that implement the recently developed F and t tests in a two-step generalized method of moments framework. For these com- mands, we opt for the orthonormal-series HAR variance estimator based on the Fourier bases because it allows us to develop convenient F and t approximations as in the first-step generalized method of moments framework. Finally, we present several examples to demonstrate these commands.

Suggested Citation

  • Xiaoqing Ye & Yixiao Sun, 2018. "Heteroskedasticity- and autocorrelation-robust F and t tests in Stata," Stata Journal, StataCorp LLC, vol. 18(4), pages 951-980, December.
  • Handle: RePEc:tsj:stataj:v:18:y:2018:i:4:p:951-980
    Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0548/
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=st0548
    File Function: link to article purchase
    Download Restriction: no
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Doshchyn, Artur, 2025. "Sinking ships: Liquidity constraints and return predictability in recessions," Journal of Monetary Economics, Elsevier, vol. 151(C).
    2. Artur Doshchyn, 2023. "Sinking Ships: Illiquidity and the Predictability of Returns on Real Assets in Recessions," Economics Series Working Papers 1028, University of Oxford, Department of Economics.
    3. Hirukawa, Masayuki, 2023. "Robust Covariance Matrix Estimation in Time Series: A Review," Econometrics and Statistics, Elsevier, vol. 27(C), pages 36-61.
    4. Jungbin Hwang & Gonzalo Valdés, 2025. "HAR Inference for Quantile Regression in Time Series," Working papers 2025-03, University of Connecticut, Department of Economics.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    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:tsj:stataj:v:18:y:2018:i:4:p:951-980. 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.

    We have no bibliographic references for this item. You can help adding them by using 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 or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.com/ .

    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.