Am 23.09.2015 um 19:08 schrieb Francesco Raffaele P.:
I'm trying with loop command, but i need a way to move on about
time like:
ols y y(-1 to -3) z w
*fcast 1990:01 1990:02 1*
ols y y(-1 to -3) z w
*fcast 1990:02 1990:03 1*
For the variable i'm using a list (list ylist = y1 y2 y3...) but i
cannot do that with time format data, how can i do?
I'm not sure if it's the most efficient way (probably not), but
something like this (untested, but similar to something I had working once):
<hansl>
...
fchorizon = 2 # or whatever
smpl 1970:01 1989:12 # initial sample
loop while $t2 <= obsnum(2000:12) # insert your final sample end
string fcstart = obslabel($t2 + 1)
string fcstart = obslabel($t2 + fchorizon)
series y = ... # redefine your realtime vintage here
ols y y(-1 to -3) z w
fcast @fcstart @fcstop # this uses string substitution
smpl +0 +1 # extend the estimation sample by one obs
endloop
...
</hansl>
hth,
sven