Series with different range

For questions regarding programming in the EViews programming language.

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

ww_jones
Posts: 4
Joined: Thu Nov 15, 2018 6:46 am

Series with different range

Postby ww_jones » Thu Nov 15, 2018 8:54 am

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!

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

Re: Series with different range

Postby EViews Gareth » Thu Nov 15, 2018 9:00 am

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}
Follow us on Twitter @IHSEViews

ww_jones
Posts: 4
Joined: Thu Nov 15, 2018 6:46 am

Re: Series with different range

Postby ww_jones » Fri Nov 16, 2018 6:20 am

Thanks, that helped a lot!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 23 guests