loop with granger test

For questions regarding programming in the EViews programming language.

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

econviews
Posts: 3
Joined: Tue Sep 08, 2020 7:04 am

loop with granger test

Postby econviews » Tue Sep 08, 2020 8:13 am

Hi everyone,

I'm pretty new to EViews and stuck with the following problem. I have a workfile with several groups. Each group has two variables and I'm trying to perform a Granger causality test for each group. I thought the 'FOR loop' would work but I always get an error. I found some of this code in the forum but it doesn't work.

%grouplist = @wlookup("*", "group")
for {%n} ={%grouplist}
{%n}.cause(2)
next

I would really appreciate it if someone could help.

Thanks!

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

Re: loop with granger test

Postby EViews Gareth » Tue Sep 08, 2020 8:18 am

Code: Select all


%grouplist = @wlookup("*", "group")
for %n {%grouplist}
   {%n}.cause(2)
next

Follow us on Twitter @IHSEViews

econviews
Posts: 3
Joined: Tue Sep 08, 2020 7:04 am

Re: loop with granger test

Postby econviews » Tue Sep 08, 2020 8:21 am

works perfect! Thanks a lot for the quick help :)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 22 guests