Saving results of an equation in a matrix
Posted: Sat Apr 04, 2009 2:50 pm
Hello:
I'd like to ask a question about saving results of a calculation into a matrix so I could copy it and saving it into an Excel spreadsheet.
I am actually calculating variance ratios for 9 series with the formula VR(q)= [Var (rt(q))] / [q* Var(rt)]
I have to calculate these ratios for q= 2 to 60 for these 9 series.
What I already did was to calculate them with the next program:
for !i=1 to 9
for !j=1 to 60
genr VR!jgrupo!i=@var((grupo!i(+!j)-grupo!i))/(!j*@var(diferenciados!i))
next
next
in which (grupo!i) is the name of my series.
Eviews creates these new series but I would like to perform a matrix with the values. I was thinking to do:
Matrix(60,9) VR
for !i=1 to 9
for !j=1 to 60
VR(!j,!i)=@var((grupo!i(+!j)-grupo!i))/(!j*@var(diferenciados!i))
next
next
But It doesn't work. How could I solve this problem?
Thank you very much
I'd like to ask a question about saving results of a calculation into a matrix so I could copy it and saving it into an Excel spreadsheet.
I am actually calculating variance ratios for 9 series with the formula VR(q)= [Var (rt(q))] / [q* Var(rt)]
I have to calculate these ratios for q= 2 to 60 for these 9 series.
What I already did was to calculate them with the next program:
for !i=1 to 9
for !j=1 to 60
genr VR!jgrupo!i=@var((grupo!i(+!j)-grupo!i))/(!j*@var(diferenciados!i))
next
next
in which (grupo!i) is the name of my series.
Eviews creates these new series but I would like to perform a matrix with the values. I was thinking to do:
Matrix(60,9) VR
for !i=1 to 9
for !j=1 to 60
VR(!j,!i)=@var((grupo!i(+!j)-grupo!i))/(!j*@var(diferenciados!i))
next
next
But It doesn't work. How could I solve this problem?
Thank you very much