Am 07.11.2022 um 22:23 schrieb tobbenlorentzen@gmail.com:
Hi Allin Cottrell,

Thank a lot for your suggestion. It works! My data are not "perfect" due to missing values, and some zeros seem to cause some trouble when taking the natural log of the dependent variable. The data are defined as time series data when uploaded into Gretl, but missing values cause trouble when running an ols regression. The HAC seems to be deactivated when the data are cleaned (when the rows of missing values are deleted from the data-file). When these data are deleted, the time interval between the observations is not consistent. However, when redefining the new, cleaned data, and defining them (data) as time series, the HAC-option function well.

Maybe the developers of Gretl can look into this problem - or lack of flexibility. R-does handle it, and also Eviews.

Hi, don't know about R, but what you're saying about Eviews is only true up to a certain extent. I just checked on Eviews 11 (not current, I know, anybody please speak up if the situation has changed since then); yes, Eviews automatically removes the interior missing values for the OLS estimate, which saves you the hassle of removing them manually. (Note that if you have a bunch of lags, this can lead to a substantial "hole" in your estimation sample, but I guess the user is supposed to be aware of that.)

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.

cheers

sven