Allin

I have tried what you suggested me and every change I imagined and I keep getting the same.

 

This is what I have in the script:

 

arima 0 1 1 ; 0 1 1 ; y --nc

addobs 12        

smpl --full

 

fcast --out-of-sample  

matrix yhat = $fcast

matrix se=$fcerr

matrix ci = (yhat - 1.96*se) ~ (yhat + 1.96*se)

series fc1=yhat[,1]

series minor=ci[,1]

series mayor=ci[,2]

 

…and this is what I get

 

For 95% confidence intervals, z(0.025) = 1.96

 

                    y    prediction    std. error        95% interval

 

 1997:06                    132791.      33883.8      66379.9 -   199202.

 1997:07                    178246.      34280.3      111058. -   245434.

 1997:08                    130851.      34672.3      62894.7 -   198808.

 1997:09                    119282.      35059.9      50565.9 -   187998.

 1997:10                    176718.      35443.3      107251. -   246186.

 1997:11                    166081.      35822.5      95869.8 -   236291.

 1997:12                    164873.      36197.8      93926.3 -   235819.

 1998:01                    148782.      36569.2      77108.0 -   220457.

 1998:02                    140043.      36936.9      67647.5 -   212437.

 1998:03                    153097.      37301.0      79989.0 -   226206.

 1998:04                    167374.      37661.5      93558.7 -   241189.

 1998:05                    151507.      38018.6      76991.9 -   226022.

 1998:06                    133511.      38372.4      58302.9 -   208720.

 

Can you please tell me what am I doing wrong?

Thanks

 

 

On Tue, 4 Dec 2012, Miviam wrote:

 

> I'm trying to write an script to save the confidence intervals after a

> forecast for an ARIMA model but the confidence intervals all have the

> same size. I read that someone experimented the same problem some time

> ago. How can I get the correct values? which are supposed to increase over time.

 

They will increase over time only if the forecast is dynamic. The most natural way to ensure that is to forecast out of sample.

 

<hansl>

open data9-7

# out-of-sample observations to reserve

scalar os = 8

smpl ; -os

arma 1 1 1 ; QNC

fcast --out-of-sample

matrix yhat = $fcast

matrix se = $fcerr

matrix ci = (yhat - 1.96*se) ~ (yhat + 1.96*se) matrix results = yhat ~ se ~ ci colnames(results, "yhat s.e. low high") print results </hansl>

 

Allin Cottrell