In time series analysis used in statistics and econometrics, autoregressive integrated moving average (ARIMA) and seasonal ARIMA (SARIMA) models are generalizations of the autoregressive moving average (ARMA) model to non-stationary series and periodic variation, respectively. All these models are fitted to time series in order to better understand it and predict future values. The purpose of these generalizations is to fit the data as well as possible. Specifically, ARMA assumes that the series is stationary, that is, its expected value is constant in time. If instead the series has a trend (but a constant variance/autocovariance), the trend is removed by "differencing", leaving a stationary series. This operation generalizes ARMA and corresponds to the "integrated" part of ARIMA. Analogously, periodic variation is removed by "seasonal differencing".
Components
As in ARMA, the "autoregressive" () part of ARIMA indicates that the evolving variable of interest is regressed on its prior values. The "moving average" () part indicates that the regression error is a linear combination of error terms whose values occurred contemporaneously and at various times in the past. The "integrated" () part indicates that the data values have been replaced with the difference between each value and the previous value.
According to Wold's decomposition theorem the ARMA model is sufficient to describe a regular (a.k.a. purely nondeterministic
If the time series contains a predictable sub-process (a.k.a. pure sine or complex-valued exponential process
- An ARIMA(0, 2, 2) model is given by <math>X_t = 2X_{t-1} - X_{t-2} +(\alpha + \beta - 2) \varepsilon_{t-1} + (1-\alpha)\varepsilon_{t-2} + \varepsilon_{t}</math> — which is equivalent to Holt's linear method with additive errors, or double exponential smoothing.
Other alternative methods include AIC, BIC, etc. If the time-series is suspected to exhibit long-range dependence, then the d parameter may be allowed to have non-integer values in an autoregressive fractionally integrated moving average model, which is also called a Fractional ARIMA (FARIMA or ARFIMA) model.
Software implementations
Various packages that apply methodology like Box–Jenkins parameter optimization are available to find the right parameters for the ARIMA model.
- EViews: has extensive ARIMA and SARIMA capabilities.
- Julia: contains an ARIMA implementation in the TimeModels package
- Mathematica: includes ARIMAProcess function.
- MATLAB: the Econometrics Toolbox includes ARIMA models and regression with ARIMA errors
- NCSS: includes several procedures for <code>ARIMA</code> fitting and forecasting.
- Python: the "statsmodels" package includes models for time series analysis – univariate time series analysis: AR, ARIMA – vector autoregressive models, VAR and structural VAR – descriptive statistics and process models for time series analysis.
- R: the standard R stats package includes an arima function, which is documented in "ARIMA Modelling of Time Series". Besides the part, the function also includes seasonal factors, an intercept term, and exogenous variables (xreg, called "external regressors"). The package astsa has scripts such as sarima to estimate seasonal or nonseasonal models and sarima.sim to simulate from these models. The CRAN task view on Time Series is the reference with many more links. The "forecast" package in R can automatically select an ARIMA model for a given time series with the function [that can often give questionable results] [http://freerangestats.info/blog/2015/09/30/autoarima-success-rates] and can also simulate seasonal and non-seasonal ARIMA models with its function.
- Ruby: the "statsample-timeseries" gem is used for time series analysis, including ARIMA models and Kalman Filtering.
- JavaScript: the "arima" package includes models for time series analysis and forecasting (ARIMA, SARIMA, SARIMAX, AutoARIMA)
- C: the "ctsa" package includes ARIMA, SARIMA, SARIMAX, AutoARIMA and multiple methods for time series analysis.
- SAFE TOOLBOXES: includes ARIMA modelling and regression with ARIMA errors.
- SAS: includes extensive ARIMA processing in its Econometric and Time Series Analysis system: SAS/ETS.
- IBM SPSS: includes ARIMA modeling in the Professional and Premium editions of its Statistics package as well as its Modeler package. The default Expert Modeler feature evaluates a range of seasonal and non-seasonal autoregressive (p), integrated (d), and moving average (q) settings and seven exponential smoothing models. The Expert Modeler can also transform the target time-series data into its square root or natural log. The user also has the option to restrict the Expert Modeler to ARIMA models, or to manually enter ARIMA nonseasonal and seasonal p, d, and q settings without Expert Modeler. Automatic outlier detection is available for seven types of outliers, and the detected outliers will be accommodated in the time-series model if this feature is selected.
- SAP: the APO-FCS package in SAP ERP from SAP allows creation and fitting of ARIMA models using the Box–Jenkins methodology.
- SQL Server Analysis Services: from Microsoft includes ARIMA as a Data Mining algorithm.
- Stata includes ARIMA modelling (using its arima command) as of Stata 9.
- StatSim: includes ARIMA models in the Forecast web app.
- Teradata Vantage has the ARIMA function as part of its machine learning engine.
- TOL (Time Oriented Language) is designed to model ARIMA models (including SARIMA, ARIMAX and DSARIMAX variants) [https://web.archive.org/web/20170327171617/https://www.tol-project.org/].
- Scala: spark-timeseries library contains ARIMA implementation for Scala, Java and Python. Implementation is designed to run on Apache Spark.
- PostgreSQL/MadLib: Time Series Analysis/ARIMA.
- X-12-ARIMA: from the US Bureau of the Census
See also
- Autocorrelation
- ARMA
- Finite impulse response
- Infinite impulse response
- Partial autocorrelation
- X-13ARIMA-SEATS
References
Further reading
- Shumway R.H. and Stoffer, D.S. (2017). Time Series Analysis and Its Applications: With R Examples. Springer. DOI: 10.1007/978-3-319-52452-8
- ARIMA Models in R. Become an expert in fitting ARIMA (autoregressive integrated moving average) models to time series data using R.
External links
- Lecture notes on ARIMA models by Robert Nau at Duke University
de:ARMA-Modell#ARIMA
