Thank you very much Allin. I’ll try it

 

Message: 2

Date: Tue, 4 Dec 2012 18:10:32 -0500 (EST)

From: Allin Cottrell <cottrell@wfu.edu>

Subject: Re: [Gretl-users] confidence intervals

To: Gretl list <gretl-users@lists.wfu.edu>

Message-ID: <alpine.LFD.2.02.1212041808080.1505@myrtle>

Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

 

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