Hello,
¿How do you type A(t-1) in a loop of equations?
I want to calculate these equations:
A_2009=c(1)+c(2)*B_2008
....
A_1988=c(1)+c(2)*B_1987
With this loop:
For !i=1988 to 2009
equation eq{!i}.ls A_{!i} c B_{!i-1}
next
¿how can you type B_i-1 in each equation?
Neither B_{!i-1} nor B_{!i}-1 works.
Thanks a lot.
loop with {!i-1}
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: loop with {!i-1}
Code: Select all
For !i=1988 to 2009
%aname = "A_" + @str(!i)
%bname = "B_" + @str(!i-1)
equation eq{!i}.ls {%aname} c {%bname}
next
Who is online
Users browsing this forum: No registered users and 2 guests
