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?
series transformation
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: series transformation
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
Re: series transformation
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.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: series transformation
You have to run it in a program (file->new->program).
Follow us on Twitter @IHSEViews
cross correlation
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