Page 1 of 1

Delete the first non-na observation

Posted: Mon Oct 16, 2017 4:01 am
by saranya
Hi,

Is there a way to delete the first non-na observation from a series?

Thanks in advance,
Saranya

Re: Delete the first non-na observation

Posted: Mon Oct 16, 2017 8:32 am
by EViews Gareth
Delete as in remove from workfile, or delete as in remove the value and turn it into an NA?

Re: Delete the first non-na observation

Posted: Mon Oct 16, 2017 10:44 pm
by saranya
turning it to NA

Re: Delete the first non-na observation

Posted: Tue Oct 17, 2017 7:57 am
by EViews Gareth

Code: Select all

y = @recode(@date=@dateval(y.@first), na, y)
where Y is the series.