On Tue, 8 Nov 2022, Sven Schreiber wrote:
However, if you then let Eviews run diagnostic tests on the estimated
residual "gappy" time series, it does carry them out, but tells you:
"interior missing value lagged residuals set to zero". This is of course a
pragmatic approach (and asymptotically justified), but will bias the results
in finite samples. This can also affect the estimates of the HAC standard
errors.
Maybe this way of handling it is preferable, given that other alternatives
will also be imperfect. But there is some arbitrariness involved in the
approach of Eviews.
Granted, there is, but I guess it's better than nothing, provided the user
is notified appropriately.
In my local tree I patched the source so as to do what I think eviews
does; if anyone's curious, the patch is attached.
By running the following piece of code
<hansl>
nulldata 64
set seed 20221109
setobs 1 1 --special-time-series
x = uniform() < 0.9 ? normal() : NA
y = uniform() < 0.9 ? normal() : NA
ols y const x --robust
</hansl>
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
Mean dependent var -0.529945 S.D. dependent var 1.023859
Sum squared resid 54.38531 S.E. of regression 1.032656
R-squared 0.002306 Adjusted R-squared -0.017257
F(1, 51) 0.088271 P-value(F) 0.767594
Log-likelihood -75.88750 Akaike criterion 155.7750
Schwarz criterion 159.7156 Hannan-Quinn 157.2904
</output>
Sven (or any other): could you cross-check against eviews to see if
results match?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------