storing r2 into vector
Posted: Mon Sep 27, 2010 12:38 am
Dear all, I use the following code in eviews 6 to store the R squared of 150 regressions to a vector.
However, sometimes the series of a dependent variable are missing in my workfile, e.g. n_a17. Then the loops stops and doesn't store the R2 of later numbers (e.g. n_a18). Is there any way to program eviews in order to skip the missing series and continue with the series that do appear in the workfile?
thanks a lot,
Simon
Code: Select all
'create vector to store r-squares
vector(150) r2s
'create empty equation to be used inside the loop
equation eq
''counter of how many equations we have run
!rowcounter=1
for !i=1 to 150
eq.ls n_a{!i} c macro
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
next
thanks a lot,
Simon