NA values in a subseries

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

John Lewis
Posts: 3
Joined: Thu May 17, 2012 3:54 am

NA values in a subseries

Postby John Lewis » Thu May 17, 2012 4:04 am

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!

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

Re: NA values in a subseries

Postby EViews Gareth » Thu May 17, 2012 7:45 am

Code: Select all

scalar check = @obs(x)=@obssmpl


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests