set verbose off
? smpl full
? scalar T=$tmax
? scalar t=$t2
? loop i=1..1073 -q
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:


Hi Burak,

try the following code:

<hansl>
set verbose off

open denmark.gdt -q

smpl 1 40
scalar T = $tmax
scalar t = $t2

scalar dT = T - t

loop i=1..dT -q
    ols IBO const IDE
    smpl +1 +1
endloop

print "Finished"
</hansl>

Artur


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

>
>
> _______________________________________________
> Gretl-users mailing list -- gretl-users@gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
> Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/