Page 1 of 1

build a list of series which fits a criteria

Posted: Thu Apr 24, 2014 12:36 pm
by organic
HI guys,

I am using Eviews 7.2

suppose I have three time series, I would like to get a list of series which have more than 10 in any given year, maybe in the form of a string object.

how would I go about doing it ?

for example:
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
series A 4 9 8 7 3 7 1 2 5 8 7 3
Series B 2 10 8 11 10 5 9 11 9 5 8 9
Series C 1 9 7 6 8 9 2 1 5 4 11 4

I should get series B and C in my list.

I think it should really straight forward but I have had a hard time coming up with a solution.
any help would be appreciated.

Re: build a list of series which fits a criteria

Posted: Thu Apr 24, 2014 5:11 pm
by EViews Gareth
I'm not sure what you're asking. It isn't clear how B and C get into your list. As far as I can see, there isn't a single year in which they both have a value greater than 10. Perhaps you mean they have 10 observations?

Re: build a list of series which fits a criteria

Posted: Fri Apr 25, 2014 2:25 am
by organic
hi Gareth,

series A, B and C are three time series between year 2000 and 2011. i would like to include any series which have greater than 10 in numeric value into a list so i can undergo further data manipulation.
in the example below, i can see

series B is greater 10 in the year 2003 and 2007
series C is greater than 10 in the year 2010

series 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
series A 4 9 8 7 3 7 1 2 5 8 7 3
Series B 2 10 8 11 10 5 9 11 9 5 8 9
Series C 1 9 7 6 8 9 2 1 5 4 11 4

Many thanks,

Re: build a list of series which fits a criteria

Posted: Fri Apr 25, 2014 2:34 am
by organic
hi Gareth ,

i can see how confusion may arise, i cannot get the data to line up properly, the top row is suppose to be year.

please refer to the attached excel file for the time series.

Re: build a list of series which fits a criteria

Posted: Fri Apr 25, 2014 6:27 am
by EViews Gareth
Ah, my confusion was from your use of "greater than 10 in any given year". I think you want "greater than 10 in any year". Or, really, you just want to check whether the maximum of the series is greater than 10.

Code: Select all

%baselist = "a b cc dd ee ff" %result = "" for %j {%baselist} if @max({%j})>10 then %result = %result + " " + %j endif next