On Thu, Nov 10, 2022 at 12:03 PM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
Am 09.11.2022 um 13:30 schrieb Riccardo (Jack) Lucchetti:
>
> I'm getting the following output:
>
> <output>
> Model 1: OLS, using observations 1-64 (T = 53)
> Missing or incomplete observations dropped: 11
> Dependent variable: y
> HAC standard errors, bandwidth 2 (Bartlett kernel)
>
> coefficient std. error t-ratio p-value
> --------------------------------------------------------
> const -0.536282 0.122625 -4.373 6.05e-05 ***
> x -0.0521759 0.175615 -0.2971 0.7676
> ...
>
> Sven (or any other): could you cross-check against eviews to see if
> results match?
>
No, not quite. Even if I force the bandwidth to 2 in Eviews (it would
automatically choose 4 here), and switch off the d.f. adjustment, the
standard errors do not match. (Coefficients do match.) I get 0.133099
and 0.140418 instead.
I can't do the Eviews comparison, but I've looked into R: lm() for
estimation and NeweyWest() from the sandwich package for HAC standard
errors. Using the new HAC_ALLOW_MISSING setting, here's what I found:
* With no missing values, gretl and R produce HAC results identical to
machine precision (given the same HAC parameters).
* With missing values, the HAC results differ noticeably, and it turns
out that R is ignoring the missing values altogether. I can replicate
the R results in gretl if after sprinkling the NAs I do "smpl
--no-missing" then reestablish the time-series property with "setobs 1
1 --special-time-series". I wonder if that could be the case with
Eviews too.
Allin