hrt-package {hrt}R Documentation

Heteroskedasticity Robust Testing

Description

The package hrt provides three functions in the context of testing affine restrictions on the regression coefficient vector in linear models with heteroskedastic (but independent) errors. The methods implemented in hrt are based on the article Pötscher and Preinerstorfer (2021). The package can be used to compute various heteroskedasticity robust test statistics; to numerically determine size-controlling critical values when the error vector is heteroskedastic and Gaussian (or, more generally, elliptically symmetric); and to compute the size of a test that is obtained from a heteroskedasticity robust test statistic and a user-supplied critical value.

Details

hrt provides three functions:

  1. The function test.stat can be used to evaluate the test statistics T_{uc}, T_{Het} (with HC0-HC4 weights), \tilde{T}_{uc}, or \tilde{T}_{Het} (with HC0R-HC4R weights), as defined in Pötscher and Preinerstorfer (2021).

  2. The function critical.value provides an implementation of Algorithm 3 in Pötscher and Preinerstorfer (2021), based on the auxiliary algorithm \mathsf{A} equal to Algorithm 1 (if q = 1) or Algorithm 2 (if q > 1) in the same reference. This function can be used to determine size-controlling critical values for the test statistics T_{uc}, T_{Het} (with HC0-HC4 weights), \tilde{T}_{uc}, or \tilde{T}_{Het} (with HC0R-HC4R weights), whenever such critical values exist (which is checked numerically when the algorithm is applied).

  3. The function size provides an implementation of Algorithm 1 or 2, respectively, in Pötscher and Preinerstorfer (2021), depending on whether q = 1 or q > 1. Given a user-supplied critical value, the respective algorithm can be used to determine the size of a test based on one of the test statistics T_{uc}, T_{Het} (with HC0-HC4 weights), \tilde{T}_{uc}, or \tilde{T}_{Het} (with HC0R-HC4R weights).

    We refer the user to the description of the three functions below, and to Pötscher and Preinerstorfer (2021) for details concerning the framework, the test statistics, the algorithms, and the underlying theoretical results.

References

Pötscher, B. M. and Preinerstorfer, D. (2021). Valid Heteroskedasticity Robust Testing. <arXiv:2104.12597>


[Package hrt version 1.0.1 Index]