In statistics and econometrics, and especially in time series analysis, an “AutoRegressive Integrated Moving Average” (ARIMA) is a broader model than the AutoRegressive Moving Average (ARMA). These models are used in time series to better understand the model or predict the future. These models are used where the data is non-stationary. In this case, once the data is integrated (corresponding to the “non-stationary” component, the data is lost and it is possible to estimate an ARMA in the new data.
This model is shown in most cases by ARIMA (p, d, q) where p, d, q are :
- p is the number of autoregressive terms,
- d is the number of nonseasonal differences needed for stationarity,
- q is the number of lagged forecast errors in the prediction equation.
ARIMA models form an important part of the Box-Jenkins approach to time series models. If one of the components is zero, it is usually written as “AR”, “I” or “MA”. For example, “MA(1)” is “ARIMA (0,0,1)”.
One of the prediction methods is the univariate box-Jenkins model. This method basically involves fitting an ARIMA model to the data. In this method, after determining the order of differentiation and determining the order of each of the AR and MA processes, the model parameters are determined. The appropriateness of the model is done by analyzing the residuals of the fitted model. If the model is correctly identified, the residuals should have the properties of independent normal random variables with zero mean and constant variance.
To predict, the time series of the data is drawn first. A series has an unstable series trend. By drawing an autocorrelation chart (ACF), stationary can be checked. A correlation graph in which the values of r does not approach zero with a reasonable velocity shows instability. If the values of r decrease relatively quickly, the series will be static. If the values of the autocorrelation function slowly tend to zero, it confirms the instability of the corresponding series. In fact, we need to compute the sample autocorrelation function for a static time series. Therefore, any process must be eliminated before calculating ACF. Also, before any conversion in order to validate the mean of the series, we must ensure the reliability of its variance. The most important tool for assessing variance is the power conversion introduced by Box Cox (1964).
If by drawing the box Cox diagram, the number one is within the 95% confidence range, it can be converted as an acceptable value of the parameter. Therefore, data conversion can be omitted. The most important transformations are variance stabilizers and differential transformations. For static series on average, it is necessary to turn it into a static series by performing appropriate transformations. In order to identify the model, it is necessary to draw a partial autocorrelation diagram of the static series and to recognize the q and p orders in the ARIMA model. In the next step, to predict the values, we fit this model to the data. Model fitting means estimating unknown model parameters. Finally, the suitability of the model is investigated by analyzing the residuals of the fitted model.
In the beginning, a summary of the ARIMA model theory is discussed and then the coding of the ARIMA model in MATLAB is explained with several examples.