Hi,
I am trying to run this loop where a counter inside the loop is changing values for the columns in the matrix. But I am having no luck, the code loops through "FXAUS FXBRZ FXCAN FXCHI" but it doesn't change to the next column in the matrix. So "j" doesn't change from 1 to 2, 3, 4 every time the larger loop is finished. What do I do?
for %a FXAUS FXBRZ FXCAN FXCHI
scalar j=1
matrix(500,500) vecstat
for !i=22 to 500
equation reg.ls lnvar c var_!i ar(1) ar(2)
vecstat(!i,j)=reg.@tstat(2)
next
j=j+1
next
Loop with changing index inside
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Loop with changing index inside
You are resetting j=1 every time through the loop.
Who is online
Users browsing this forum: No registered users and 2 guests
