'cut' nas from beginning and end of series

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

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

cfbiehl
Posts: 8
Joined: Tue Aug 10, 2010 1:05 am

'cut' nas from beginning and end of series

Postby cfbiehl » Sat Feb 23, 2013 5:33 am

I am wondering how I can create a sample (object) from a series which contains nas before and after the values which I actually want to use.

e.g.:
series:
1/2011: na
2/2011: na
3/2011: 1
4/2011: 2
5/2011: na
6/2011: na

sample 3/2011 till 4/2011:
3/2011: 1
4/2011: 2

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

Re: 'cut' nas from beginning and end of series

Postby EViews Gareth » Sat Feb 23, 2013 8:25 am

Assuming you don't have internal NAs, just do:

Code: Select all

sample mysample if x<>na

cfbiehl
Posts: 8
Joined: Tue Aug 10, 2010 1:05 am

Re: 'cut' nas from beginning and end of series

Postby cfbiehl » Mon Feb 25, 2013 2:52 am

great thank you!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests