loop @movecor with series names

For questions regarding programming in the EViews programming language.

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

MSQ1
Posts: 13
Joined: Fri Sep 17, 2010 7:18 am

loop @movecor with series names

Postby MSQ1 » Fri Sep 17, 2010 7:32 am

Hi,

I want to loop @movecor with series names but get get the values NA using the following code

%name1_1 = "A"
%name1_2 = "B"

for !loop1=1 to 2
%name1 = %name1_{!loop1}
series corr1 = @movcor(%name1,C,50)
next

It seems that @movecor does not understand that the name should be A and not "A" since it states the code to be
corr1 = @movcor("A",C,50) in the output and hence cannot calculate the correlations
Why?

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

Re: loop @movecor with series names

Postby EViews Gareth » Fri Sep 17, 2010 8:26 am

Code: Select all

series corr1 = @movcor({%name1},C,50)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests