Skip to main content
eScholarship
Open Access Publications from the University of California

Heteroscedasticity and Autocorrelation Robust F and t Tests in Stata

  • Author(s): Ye, Xiaoqing
  • Sun, Yixiao
  • et al.
Abstract

In this article, we consider time series OLS and IV regressions and introduce a new pair of commands, har and hart, which implement a more accu- rate class of heteroscedasticity 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 approximations 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, the two fundamental objects in every hypothesis testing problem. The estimation com- mand har and the post-estimation 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 which imple- ment the recently developed F and t tests in a two-step GMM framework. For this command we opt for the orthonormal series HAR variance estimator based on the Fourier bases,  as it allows us to develop convenient F and t approxima- tions as in the first-step GMM framework.  Finally, we present several examples to demonstrate the use of these commands.

Main Content
Current View