0

i am having a simple problem ,i am sure the solution is easy but , i am not able to solve it . however when i operate :

smpl 1  500
genr u1=nrnd*4
genr u2=nrnd*5
genr serix =.1
genr serix =.1
genr seriy=.1
for !i=2 to 500 
smpl !i !i 
serix=17.129+0.00676*serix(-1)+0.6125*seriy(-1)+ u1
serix=12.863+0.1756*serix(-1)+0.2992*seriy(-1)+ u2

it shows an error , in the "for" instruction enter image description here it says "Flow of Control Statement..."

Zina Jg
  • 1
  • 3

1 Answers1

0

Try this

create Test  u  500 
mode quiet

smpl 1  1
series x=0.1
series y=0.1

for !i=2 to 500
    !u1=@nrnd*4
    !u2=@nrnd*5
    smpl !i !i 
    series x=17.129+0.00676*x(-1)+0.6125*y(-1)+ !u1
    series y=12.863+0.1756*x(-1)+0.2992*y(-1)+ !u2
next !i

smpl @all