1
$\begingroup$

I am working on a Time Series model, and the series appeared to be non stationary (presence of trend & seasonality), as I was using ARIMA to predict for my time Series , I performed first order differencing.

My question is now if I am predicting future values, are the predictions going to be differenced? Do I need to undo the differencing in any manner before forecasting?

On a side note, can I use an ARIMA (p,d,q) (P,D,Q) model instead of differencing to account for seasonality ?

$\endgroup$
  • $\begingroup$ The answer is yes, the predictions will be transformed and, if you try to do this manually, you will need to back-transform your model to get the correct forecasted values. The good news is that this process is fully automated in most statistical software so you won't have to do it manually. $\endgroup$ – Digio Jul 24 '17 at 10:51
  • $\begingroup$ @Digio , any suggestions on how to tackle it in R, or just the forecast function will take care of it in R, also any comments on the SARIMA vs ARIMA with differencing part in my question ? $\endgroup$ – av abhishiek Jul 24 '17 at 10:55
  • $\begingroup$ I have reposted everything as an answer below. $\endgroup$ – Digio Jul 24 '17 at 11:05
1
$\begingroup$

The answer is yes, the predictions will be transformed and, if you try to do this manually, you will need to back-transform your model to get the correct forecasted values. The good news is that this process is fully automated in most statistical software so you won't have to do it manually. An example using Hyndman's 'forecast' package would be:

# Without integrated term:
plot( forecast(Arima(y = WWWusage, order = c(1,0,1))) )

# With integrated term:
plot( forecast(Arima(y = WWWusage, order = c(1,1,1))) )

As you can see, in both cases the output forecast value in the back-transformed units, as opposed to:

# With manual differencing (non-automated way):
plot( forecast(Arima(y = diff(WWWusage), order = c(1,0,1))) )

which forecasts unintelligible values.

If you want to use a seasonal ARIMA(p,d,q)(P,D,Q) model you should do so on grounds of some model validation metric and not because you're trying to sidestep the integrated terms (which you probably won't anyway). The best thing to do would be to let function auto.arima select a model for you.

$\endgroup$
  • $\begingroup$ thanks for the answer, I was wondering if we perform differencing it will remove or try to remove seasonality , then how can we use ARIMA(p,d,q)(P,D,Q) ? i.e can we use differencing along with seasonality ? $\endgroup$ – av abhishiek Jul 24 '17 at 12:18
  • $\begingroup$ You must see differencing and seasonality as two different things. The integrated term removes trend, not seasonality. A seasonal model will likely require an integrated term as much as a non-seasonal. $\endgroup$ – Digio Jul 24 '17 at 12:27
  • $\begingroup$ ohh, that explains, but from [link] [otexts.org/fpp/8/1], it states "Transformations such as logarithms can help to stabilize the variance of a time series. Differencing can help stabilize the mean of a time series by removing changes in the level of a time series, and so eliminating trend and seasonality." It seems to be a reputed site and thats why I am confused. $\endgroup$ – av abhishiek Jul 24 '17 at 12:32
  • $\begingroup$ Yes, it's a book written by the person I cited earlier (Pr. Hyndman) but I think you misinterpreted what it says. Stationarity transformations such as logarithmising may create a "seasonally adjusted time series" (where seasonality exists) but the purpose of the differencing operator is to remove trend and can be applied just as well to non-seasonal series. It is nowhere implied that a seasonal model will never have to be differenced, e.g. auto.arima(JohnsonJohnson) returns an ARIMA(1,1,2)(0,1,0) model. $\endgroup$ – Digio Jul 24 '17 at 13:06
  • $\begingroup$ Ohh that explains it, is it possible that if we have time series which has only seasonality and no trend then we can directly apply a seasonality Arima in forecast instead of differencing $\endgroup$ – av abhishiek Jul 24 '17 at 14:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.