On Thu, 25 Aug 2011, Skipper Seabold wrote:
On Thu, Aug 25, 2011 at 9:21 PM, Allin Cottrell
<cottrell(a)wfu.edu> wrote:
>
> On Thu, 25 Aug 2011, Skipper Seabold wrote:
>
>> I'm estimating an ARMA(2,2) model from generated data using gretl's
>> exact likelihood. When I forecast 10 periods out from the end of the
>> sample, the first 2 forecast standard errors are as I would expect.
>> However, after this the standard error of the prediction is larger
>> than the standard error of my series. I was under the impression that
>> this cannot be.
>
> "This cannot be" only for a one-step ahead forecast. For an h-step
> ahead forecast the error variance is \sigma^2 for the series times
> (1 + \psi_1^2 + \psi_2^2 + ... + \psi_{h-1}^2) where the \psi's
> are the coefficients of the infinite MA representation. [...]
Thanks Allin,
I realize all of the above, and it's how I came to ask the question.
But I guess I'm still misunderstanding or being dense.
Not so; see below.
Consider the following R code (apologies, I'm still mainly a
point
and click guy with gretl)
data <- read.csv('y_arma.csv', header=FALSE)
mod <- arima(data$V1, order=c(2,0,2), include.mean=FALSE)
ma_rep <- ARMAtoMA(mod$coef[1:2],mod$coef[3:4], lag.max=10)
ma_rep <- c(1, ma_rep)
serr <- sqrt(mod$sigma2 * cumsum(ma_rep^2))
print(serr)
[1] 1.054555 1.448353 1.494564 1.634206 1.693062 1.699978 1.700106 1.701582
[9] 1.702436 1.702578 1.702578
I believe you're right; I think I've identified a transcription
error in the gretl code (derived from Box and Jenkins), which meant
that ARMA forecasts of more than one step ahead were incorrect when
the MA order is greater than one. I've made a change in CVS and
gretl's forecast variance agrees with R, modulo the effect of slight
differences in the phi and theta estimates.
I'll do some more checking tomorrow to confirm that the fix is
right, but thanks for spotting this!
Allin