Looping with shifting sample range
Posted: Thu Mar 31, 2011 5:33 pm
Hi,
I'm trying to record F-statistics of regressions for one series "xr" where the equation is
xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
for the xr series (sample size = 888)
I want to make a program that will loop the estimation 50 observations at a time (in sequence) through the entire sample size. Specifically, I want to:
smpl 1 51
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
smpl 2 52
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
smpl 3 53
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
.
.
.
smpl 838 888
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
end
is there program I can write that can sequence the estimation from sample size 1-51, then 5-52, all the way up to 838-888 in 50 observation windows, while recording the F-statistic for each estimation along the way? Thanks for your help.
I'm trying to record F-statistics of regressions for one series "xr" where the equation is
xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
for the xr series (sample size = 888)
I want to make a program that will loop the estimation 50 observations at a time (in sequence) through the entire sample size. Specifically, I want to:
smpl 1 51
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
smpl 2 52
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
smpl 3 53
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
.
.
.
smpl 838 888
ls xr c xr(-1) xr(-2) xr(-3) ... xr(-50)
*record f-statistic*
end
is there program I can write that can sequence the estimation from sample size 1-51, then 5-52, all the way up to 838-888 in 50 observation windows, while recording the F-statistic for each estimation along the way? Thanks for your help.