Enter commands for loop. Type 'endloop' to get out
> ols RV5_SPX const RV5_SPX(-1) HARWEEK HARMONTH
> smpl 23+i 335+i
> genr s=$yhat
> endloop
I need to change red expression above (genr s=$yhat), which is wrong. Actually I am trying to save fitted values, so one-step-ahead out-of-sample forecasts of each regression. I feel I need to add a couple of codes to circulate every single regression but i am not sure.
Thanks very much,
On Saturday, February 8, 2020, 02:58:18 PM GMT, Burak Korkusuz <burakkorkusuz@yahoo.com> wrote:
Thanks very much Artur,
This works fine, but do you know how to save one-step-ahead forecasted values as a series. I mean I need to add something between codes to save it.
On Saturday, February 8, 2020, 02:35:22 PM GMT, Artur Tarassow <atecon@posteo.de> wrote:
Am 08.02.20 um 15:30 schrieb Burak Korkusuz: > Hi, > I am trying to do rolling windows regression. Does something wrong in > my codes? because this does not work and I feel I have something missing. > > set verbose off > smpl 23 335 > series y = ols RV5_SPX const RV5_SPX(-1) HARWEEK HARMONTH --quiet > scalar T = $tmax > scalar t = $t2 > loop while t<=T -q > if t<T > smpl +1 +1 > print y -o > endif > t++ > endloop