The Python package statsmodels
provides a use_correction
option when computing HAC standard errors for an OLS model, which purportedly corrects for small sample size. When I dug into the code however, I encountered the following comment:
just guessing on correction factor, need reference
This caused a little alarm, since this correction factor significantly affects the interpretation of my fit.
The correction factor, as far as I understand the code, seems to consist in simply multiplying the usual HAC covariance matrix with $n / (n - k)$, where $n$ is the number of observations and $k$ the number of parameters in the model. While this seems plausible, I am no expert, and would very much (like the code's author) appreciate a justification or reference for this factor.