Page 1 of 1

Series with different range

Posted: Thu Nov 15, 2018 8:54 am
by ww_jones
Hi all,

I have the following issue: I have a large amount of series that need to be manipulated. However, the series have different ranges. I want to write a quick program that would adjust the sample every time for the respective series.
For example - if we have the following series:
s1 (range 2000m01 - 2018m02), s2 (range 2003m01 2018m01), s3 (1995m01 2008m03) s4(..) etc.

the program needs to set the sample to 2000m01 - 2018m02 first, then apply the manipulation (seasonal adjustment for example) to s1, then set the sample to 2003m01-2018m01 for s2, do the seasonal adjustment for s2, then the sample for s3, s4 and so on.

Any support will be appreciated, thank you in advance!

Re: Series with different range

Posted: Thu Nov 15, 2018 9:00 am
by EViews Gareth
Easiest way, if the series don't have interior missings, is to just do:

Code: Select all

smpl if s1<>na
smpl if s2<>na

(or in a loop).

If there are interior missings, then something like:

Code: Select all

%start  = s1.@first
%end = s1.@last
smpl {%start} {%end}

Re: Series with different range

Posted: Fri Nov 16, 2018 6:20 am
by ww_jones
Thanks, that helped a lot!