Hi,
I am trying to perform a rolling-window estimation t+k period ahead. I am using the command "rolling" and I have managed to get an estimation for k=1 only. How can I add k=2, k=3 etc...
I am using a code that is similar to the following:
How can I modify it so that I can add the _b[ ] for k={2,3...n} in the "betas.dta" file? Thanks!
I am trying to perform a rolling-window estimation t+k period ahead. I am using the command "rolling" and I have managed to get an estimation for k=1 only. How can I add k=2, k=3 etc...
I am using a code that is similar to the following:
Code:
use http://www.stata-press.com/data/r13/ibm, clear tsset t generate ibmadj = ibm - irx generate spxadj = spx - irx rolling _b _se, window(200) saving(betas, replace) keep(date): regress ibmadj spxadj use betas.dta, clear