MATLAB: Hac function: pvalues or confidence intervals

Econometrics Toolboxhac

Hi, the function
hac
returns as coefficients the same of standard OLS. Is this correct? What changes is the covariance matrix.
At this point I would like to ask you how I could obtain the pvalues of the coefficients with hac methodology or how to get a confidence interval. I googled a bit but I could not find specific answer.
Thanks

Best Answer

Hi Fregior,
Yes, the point estimator returned by HAC is the same as the OLS estimator.
HAC returns the covariance matrix EstCov. Then we can compute the standard erros, t-statistics, p-values and confidence intervals:
SE = sqrt(diag(EstCov))
tStat = OLS ./ SE
pVal = erfc(0.7071 * abs(tStat))
CI = [OLS-2*SE, OLS+2*SE]