Delete the first non-na observation

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Jason, EViews Moderator, EViews Pamela

saranya
Posts: 33
Joined: Wed Nov 16, 2016 5:51 am

Delete the first non-na observation

Postby saranya » Mon Oct 16, 2017 4:01 am

Hi,

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

Thanks in advance,
Saranya

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11733
Joined: Tue Sep 16, 2008 5:38 pm

Re: Delete the first non-na observation

Postby EViews Gareth » Mon Oct 16, 2017 8:32 am

Delete as in remove from workfile, or delete as in remove the value and turn it into an NA?
Follow us on Twitter @IHSEViews

saranya
Posts: 33
Joined: Wed Nov 16, 2016 5:51 am

Re: Delete the first non-na observation

Postby saranya » Mon Oct 16, 2017 10:44 pm

turning it to NA

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11733
Joined: Tue Sep 16, 2008 5:38 pm

Re: Delete the first non-na observation

Postby EViews Gareth » Tue Oct 17, 2017 7:57 am

Code: Select all

y = @recode(@date=@dateval(y.@first), na, y)


where Y is the series.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 4 guests