series transformation

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

ercan
Posts: 7
Joined: Sun Dec 07, 2008 2:23 am

series transformation

Postby ercan » Tue Feb 22, 2011 6:30 am

I have 20 different series in a workfile. And I'd like to generate 4 period movibg averages of tehse series in a new page without having to do it one by one. for example, for series 1 named x i write the follwing code:

series xm=@movav(x,4)

this procedure only creates teh ma of series x. Can I write a loop to generate ma of 20 series?

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

Re: series transformation

Postby EViews Gareth » Tue Feb 22, 2011 8:59 am

Put them in a group, then write a loop based on the group.

Code: Select all

group g x '..... all other series here
for !i=1 to g.@count
%name = g.@seriesname(!i)
%newname = %name + "m"
series {%newname} = @movav({%name}, 4)
next
Follow us on Twitter @IHSEViews

ercan
Posts: 7
Joined: Sun Dec 07, 2008 2:23 am

Re: series transformation

Postby ercan » Tue Feb 22, 2011 9:42 am

I copied the code in the command space. when i run it i get "flow of control statement executed from the comamnd line" error message.

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

Re: series transformation

Postby EViews Gareth » Tue Feb 22, 2011 10:06 am

You have to run it in a program (file->new->program).
Follow us on Twitter @IHSEViews

ercan
Posts: 7
Joined: Sun Dec 07, 2008 2:23 am

cross correlation

Postby ercan » Fri Feb 25, 2011 8:39 am

Is there a way to extract lead and lag cross correlation coefficients for multiple series? I have 10 distinct series which I would like to compute cross correlation against a series without doing it manually one by one.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 11 guests