Em 27 de dezembro de 2011 clarodina(a)lycos.com escreveu:
Hi,
Is there some ways to save the forecast value? The manual mention about saving forecast
to be written
How to have rolling t value? Using smpl +1 +1 and ols v1 v2 might do the task but have
many other outputs. Tks
Maybe I can help you with the second question...
Please take a look at the following script. It is not elegant, but may
be useful for you ;-)
<hansl>
open hamilton.gdt
scalar Window = 48 # The length of the window
smpl 1973:01 1988:12
scalar X = $nobs - Window
scalar Obs = X + 1
smpl ; -X
matrix Coef = zeros(Obs,1)
loop i = 1..Obs
smpl +1 +1
ols EXRITL const EXRITL(-1) PC6IT PZUNEW
scalar stat_t$i = $coeff[2]/$stderr[2]
print stat_t$i
matrix Coef[$i,1]=stat_t$i
endloop
smpl 1973:01 1988:12
smpl +(Window-1) ;
series Teste_t = Coef[,1]
gnuplot Teste_t {set title "Rolling window t statistic"\
font "Arial,14"; set style line 1 lc rgb "#ff0000"\
lw 3;} --time-series --with-lines --single-yaxis --output=display
</hansl>
Um abraço,
Henrique Andrade