1
$\begingroup$

I'm trying to fit an ARIMA model in R, but auto.arima and the standard arima function for some reason keep giving me different results and different forecasts.

For example, if I fit the model with arima, I use:

ARIMA011 <- arima(data, order=c(0,0,1))

and it gives me:

Call:
arima(x = data, order = c(0, 1, 1))

Coefficients:
         ma1
      0.6096
s.e.  0.0403

sigma^2 estimated as 0.0381:  log likelihood = 64.42,  aic = -124.85

If I use auto.arima:

auto.arima(data)

It gives:

Series: data
ARIMA(0,1,1) with drift         

Coefficients:
         ma1   drift
      0.3691  0.1908
s.e.  0.0578  0.0118

sigma^2 estimated as 0.02249:  log likelihood=145.03
AIC=-284.06   AICc=-283.98   BIC=-272.94

Even the AIC for the models are different. Can someone explain why this is the case, and which of the methods is preferable?

$\endgroup$
  • 2
    $\begingroup$ Don't you see that auto.arima includes drift while your manual arima specification does not? I don't know if you can manually choose to include drift with arima, but that should be possible with Arima from the "forecast" package. $\endgroup$ – Richard Hardy Jan 8 '17 at 23:37
  • $\begingroup$ Yes, I did notice that the arima function won't include a drift for some reason if I use a difference (I still don't quite understand why... STATA and Minitab will). But I've always thought I could "back it out" using the mean of the series, but I guess not. That would explain the difference in the AIC's of the model. $\endgroup$ – Matt.P Jan 8 '17 at 23:49
  • 1
    $\begingroup$ Excellent... you were absolutely correct. The Arima (capital "a") function does allow me to include a drift if I type "include.drift = TRUE." It gave the same results. Thank you again. $\endgroup$ – Matt.P Jan 8 '17 at 23:51
  • $\begingroup$ You can include a drift term with stats::arima by passing a linear trend to the xreg argument, also. I don't know the why but it is explicitly mentioned in the documentation. The two models (with or without drift) are obviously different models, and "backing out the mean" only makes sense if you do it first, not after you fit an incorrectly specified MA(1). $\endgroup$ – Chris Haug Jan 9 '17 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.