I have regressed 228 regressions now, and I want to build a matrix to store the coefficients and here is my code(unsuccessful to build the matrix) .
Code: Select all
wfopen C:\Users\dell\Desktop\data.xls
for !i= 1 to 12 'month
for !j=2001 to 2019 'year
smpl {!j}m{!i} {!j}m{!i}
genr a{!j}{!i} =ri
genr b{!j}{!i} =roil
genr c{!j}{!i} =rm
matrix(3,{!j}{!i}) coefs
equation eq{!j}{!i}.ls a{!j}{!i} c b{!j}{!i} c{!j}{!i}
colplace(coefs, eq{!j}{!i}.@coefs,{!j}{!i})
next
next
I try to build a matrix according to http://forums.eviews.com/viewtopic.php?t=1638#p5508(An introduction to EViews programming by Gareth), but because I select subsamples according to date(yyyy-mm) which contains 2 for loops, I don't know how to build a valid matrix and store the coefficients correctly.
If anyone can give me a hand, I will be grateful!
Thank for your kind in advance!