Page 1 of 1

loop with granger test

Posted: Tue Sep 08, 2020 8:13 am
by econviews
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!

Re: loop with granger test

Posted: Tue Sep 08, 2020 8:18 am
by EViews Gareth

Code: Select all

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

Re: loop with granger test

Posted: Tue Sep 08, 2020 8:21 am
by econviews
works perfect! Thanks a lot for the quick help :)