Colplace out of range error
Posted: Mon Oct 24, 2016 5:55 pm
I want to estimate the betas for the three stock using rolling regression with window of 36 (months) and step size of 12 (months). I am getting the following error when I run the code.
Matrix-Vector is out of range in "Colplace(coefmat1,eq1.@coefs,13)".
for !i=1 to 3
!window = 36
!step = 12
!length = @obsrange
equation eq1
!nrolls = @round((!length-!window)/!step)
matrix(6,!nrolls) mastermat
matrix(2,!nrolls) coefmat!i
!j= 0
for !j=1 to !length-!window+1-!step step !step
smpl @first+!j @first+!j+!window-1
equation eq1.ls(options) r!i c mrp
colplace(coefmat!i,eq1.@coefs,!j)
next
matplace(mastermat, coefmat!i, 1,1)
next
Matrix-Vector is out of range in "Colplace(coefmat1,eq1.@coefs,13)".
for !i=1 to 3
!window = 36
!step = 12
!length = @obsrange
equation eq1
!nrolls = @round((!length-!window)/!step)
matrix(6,!nrolls) mastermat
matrix(2,!nrolls) coefmat!i
!j= 0
for !j=1 to !length-!window+1-!step step !step
smpl @first+!j @first+!j+!window-1
equation eq1.ls(options) r!i c mrp
colplace(coefmat!i,eq1.@coefs,!j)
next
matplace(mastermat, coefmat!i, 1,1)
next