# Very different prediction intervals from ARIMA models where MA order differs by 1

I have fit an ARIMA model to a time series with function auto.arima from "forecast" package in R. I wanted to check prediction intervals for robustness by changing the ARIMA terms.

Here is my R code:

library("forecast", lib.loc="~/R/win-library/3.2")
library("tseries", lib.loc="~/R/win-library/3.2")

price = c(256, 223, 190, 170 ,140, 123, 133, 133, 125, 120, 125, 140, 166, 186, 206, 206, 206, 206, 206, 206,
229, 263, 273, 273 ,273 ,273 ,258, 239, 233, 226, 226, 226, 249, 249, 249, 249, 249, 269, 279, 279,
279, 279, 299, 316, 316, 316, 316, 316, 316, 316, 299, 299, 299 ,319, 319, 339 ,339, 356 ,356, 356,
343, 343, 333 ,343 ,442 ,599, 599, 599, 599, 549, 516, 336, 336, 336, 309, 309 ,319, 565, 665, 832,
832, 698, 632, 532, 499, 526, 526, 526, 526, 499, 466, 333 ,233, 233, 216, 200, 200, 200, 226, 239,
279, 316, 333 ,366 ,366 ,366, 366 ,366 ,333 ,349 ,349, 349 ,359 ,359, 442 ,459 ,449 ,449, 449, 449,
449, 449 ,449 ,459, 459 ,459, 459, 459, 446, 446, 446, 446, 459, 459, 439, 439, 439, 439, 482, 482,
482, 482 ,516,516, 532, 532, 532 ,532 ,532 ,549, 599, 632 ,632 ,632, 632, 599 ,565 ,532, 482, 482,
482, 482, 499 ,475 ,449, 416)

ts.plot(price)

auto.arima(price)

arima.fit<-Arima(price, c(2,1,4), include.drift=TRUE)
plot(forecast.Arima(arima.fit, 60), ylim=c(-300,1300))

arima.fit<-Arima(price, c(2,1,3), include.drift=TRUE)
plot(forecast.Arima(arima.fit, 60), ylim=c(-300,1300))


What I saw surprised me quite a bit:

Why do the prediction intervals widen in the MA(3) case and hardly so in the MA(4) case?

Model outcomes (such as forecast intervals) depend not only on functional form and autoregressive/moving average orders but also on the estimated coefficient values. While your model orders are clearly similar (only the MA order differs by one), perhaps the estimated coefficients differ by a lot, producing quite different behaviour in the different cases. Here is what the two models look like:

Series: price
ARIMA(2,1,4) with drift

Coefficients:
ar1     ar2     ma1      ma2      ma3      ma4   drift
0.1446  0.5170  0.2967  -0.4308  -0.3966  -0.4693  1.8511
s.e.  0.1104  0.0996  0.1150   0.0840   0.0923   0.0770  0.5307

sigma^2 estimated as 1086:  log likelihood=-807.24
AIC=1630.49   AICc=1631.41   BIC=1655.33


and

Series: price
ARIMA(2,1,3) with drift

Coefficients:
ar1      ar2     ma1     ma2     ma3   drift
-1.0362  -0.4130  1.5536  1.2431  0.5722  0.6752
s.e.   0.1412   0.1267  0.1138  0.1417  0.0719  4.6976

sigma^2 estimated as 1152:  log likelihood=-810.76
AIC=1635.52   AICc=1636.23   BIC=1657.26


The coefficient values are very different, so you may generally expect quite some discrepancy between the two models. Which is what you see in your graphs, of course.

• Thank you very much! The coefficients really are very different. – Mairuu Apr 18 '16 at 19:14