Page 1 of 1

'cut' nas from beginning and end of series

Posted: Sat Feb 23, 2013 5:33 am
by cfbiehl
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

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

Posted: Sat Feb 23, 2013 8:25 am
by EViews Gareth
Assuming you don't have internal NAs, just do:

Code: Select all

sample mysample if x<>na

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

Posted: Mon Feb 25, 2013 2:52 am
by cfbiehl
great thank you!