Page 1 of 1

NA values in a subseries

Posted: Thu May 17, 2012 4:04 am
by John Lewis
Hi everyone!

I'm trying to find the shortest code for the task below. I believe that I knew earlier how to do it in 1-2 lines but now I can't remember it.

Assume, we have a series X with yearly observations for the period from 1993 till 2007. We have a subperiod (say 2001-2005). How to check that all the elements of X for the subperiod are non-NA? Equivalently, how to check whether there is at least one NA value in X in this subperiod?

Thanks for all kinds of help!

Re: NA values in a subseries

Posted: Thu May 17, 2012 7:45 am
by EViews Gareth

Code: Select all

scalar check = @obs(x)=@obssmpl