Hi Sven,

 

Thank you for your reply! Try this:

 

nulldata 5

# setobs 1 1 --time-series

setobs 5 1965-01-05 --time-series

series y = 0

y[3] = NA

print y

series x2 = y(-1)

print x

 

I guess it’s the date indexing that is the culprit.

 

Best,

Igor

 

Igor Pozdeev
Visiting Scholar
NYU Stern School of Business

44 West 4th Street, 9-66

New York, NY 10012
+1-917-657-1120

www.igorpozdeev.me

 

From: gretl-devel-bounces@lists.wfu.edu <gretl-devel-bounces@lists.wfu.edu> On Behalf Of Sven Schreiber
Sent: Friday, October 26, 2018 10:22 AM
To: gretl-devel@lists.wfu.edu
Subject: Re: [Gretl-devel] missing values being forward-filled in lagged variables

 

Am 26.10.2018 um 10:08 schrieb Pozdeev, Igor:



 

This looks like a feature but is a bug by my standards: missing values are being forward-filled when lags are taken of variables.

 

(where "forward-filled" means that the missing value is skipped and the valid entry before/earlier than that is used)

Hi,
I agree it would be a pretty hefty bug. However, I cannot confirm this so far:
<hansl>
nulldata 5
setobs 1 1 --time-series
series y = 0
y[3] = NA
print y
series x = y(-1)
print x
</hansl>

This preserves the NA alright. So you would have to tell us exactly how you got your results.

thanks,
sven