3
$\begingroup$

I am studying ARIMA models from this tutorial time-series-forecasting-codes-python, but I got confused on many points:

  1. We do many transformations to get stationarity data and every transformation we get data with good stationarity and on the example, he got the best stationary after applying the Decomposing, then why he did use the ts_log_diff and ts_log data with ACF, PACF and ARIMA instead of using the Decomposing data !?
  2. I did see many styles for ACF and PACF one like continuous graph and another one like pins, which one I should go for it?
  3. What is the best and easiest way to detect AR and MA by ACF and PACF? Some tutorials mention about every ARIMA model has a special ACF and PACF pattern and others mention about the intersection between the lags and the confidence upper line!
  4. Is there any way to automate the step of getting the AR and MA instead of trying to investigate the ACF and PACF plots?
$\endgroup$
  • 1
    $\begingroup$ 4. auto.arima algorithm by Hyndman and Kandakhar as implemented in "forecast" package in R. See a description in an article in Journal of Statistical Software. $\endgroup$ – Richard Hardy Sep 2 '16 at 15:07
  • $\begingroup$ Thanks @RichardHardy, but is there any similar method on python or not !! because I do not think that statsmodels on python has something like this. Anyway, could you suggest a way to take the information directly from ACF and PACF matrices and then apply a special analysis to figure out the AR and MA $\endgroup$ – Yassir Sep 2 '16 at 15:38
  • $\begingroup$ Question on software implementations are off topic here. As you ask "is there a way to automate...", I told you that there is and what it is. It is unimportant that it is implemented in R; the important thing is that the idea behind the algorithm is explained in an academic paper that you can read. $\endgroup$ – Richard Hardy Sep 2 '16 at 16:11
  • $\begingroup$ @Yassir you asked if there was a way to automatically figure out a way to determine the AR MA structure (if there were unusual values or level/.step changes or seasonal pulses or local time trends ) while being sensitive to both changes in parameters and changes in error variance. The answer is yes but it is not in anything that has been recommended here. $\endgroup$ – IrishStat Oct 21 '16 at 16:03
1
$\begingroup$

After reading many articles and examples and during my work with my data I figure out the answers to my questions:

1- when you have non-stationary data (with trend and seasonality) you should do some transformation on the data to find a good stationary, every step mean something for ARIMA let's say you applied a first differencing on the data so that's mean you should add d=1 to the model and at the end you are not going to use the transformed data with the model and you will use your raw data directly with the model and the transformed data are useful to detect AR, MA and the degree of differencing.

2- the continues and the pins graph are same.

3- there are many ways to find AR and MA the famous one is by ACF and PACF chart and for sure it depends on the lags pattern, you can find some rules about it here.

the easiest way to find the ARIMA model is by calculating AIC for many models then get the model with the minimum AIC and that what auto.arima() do in R.

4-yes there is a function in statsmodels called arma_order_select_ic help to find the best ARIMA model for python by using AIC.

$\endgroup$
  • $\begingroup$ About the first, you do not mention how to get back prediction with d=1 to original scale of the raw data. Do you recommend any approach to do it? $\endgroup$ – Adelson Araújo May 9 '17 at 22:22
0
$\begingroup$

In response to Question 1:

The author of the article you mentioned probably used the ts_log_diff transformations to show the forecasting examples because this the most common transformation for most data sets (i.e most generalizable).

EDIT:

It is my understanding that the ARIMA models are used in cases where stationarity cannot be achieved as the author has pointed out in the original post in Section 5: Forecasting a Time Series:

"A series with significant dependence among values. In this case we need to use some statistical models like ARIMA to forecast the data."

$\endgroup$
  • $\begingroup$ Thank you, but should we use the best stationary data coming from the specific transformation or not!?, like in the example which I mentioned above should we use the Decomposing data with ACF, PACF and ARIMA because it's giving good stationary or not! also why he used ts_log_diff with ACF and PACF, but he did not use it with ARIMA model !! $\endgroup$ – Yassir Sep 2 '16 at 15:32
  • $\begingroup$ @Yassir I have edited my response to address your some of your additional questions. Also there is a Comments section at the bottom of the article which you reference, it may help you more to ask specific article related questions in that forum rather than posting those questions here and asking us to interpret the authors original intent of examples that they chose. $\endgroup$ – Will Sep 3 '16 at 17:48

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.