World Library  
Flag as Inappropriate
Email this Article

Autoregressive–moving-average model

Article Id: WHEBN0000764848
Reproduction Date:

Title: Autoregressive–moving-average model  
Author: World Heritage Encyclopedia
Language: English
Subject: List of statistics articles, Autoregressive conditional heteroskedasticity, Statistics, Noise, Order of integration
Collection: Noise, Time Series Analysis
Publisher: World Heritage Encyclopedia

Autoregressive–moving-average model

In the Gwilym Jenkins.

Given a time series of data Xt, the ARMA model is a tool for understanding and, perhaps, predicting future values in this series. The model consists of two parts, an autoregressive (AR) part and a moving average (MA) part. The model is usually then referred to as the ARMA(p,q) model where p is the order of the autoregressive part and q is the order of the moving average part (as defined below).


  • Autoregressive model 1
  • Moving-average model 2
  • ARMA model 3
  • Note about the error terms 4
  • Specification in terms of lag operator 5
    • Alternative notation 5.1
  • Fitting models 6
    • Implementations in statistics packages 6.1
  • Applications 7
  • Generalizations 8
    • Autoregressive–moving-average model with exogenous inputs model (ARMAX model) 8.1
  • See also 9
  • References 10
  • Further reading 11

Autoregressive model

The notation AR(p) refers to the autoregressive model of order p. The AR(p) model is written

X_t = c + \sum_{i=1}^p \varphi_i X_{t-i}+ \varepsilon_t .\,

where \varphi_1, \ldots, \varphi_p are parameters, c is a constant, and the random variable \varepsilon_t is white noise.

Some constraints are necessary on the values of the parameters so that the model remains stationary. For example, processes in the AR(1) model with |φ1| ≥ 1 are not stationary.

Moving-average model

The notation MA(q) refers to the moving average model of order q:

X_t = \mu + \varepsilon_t + \sum_{i=1}^q \theta_i \varepsilon_{t-i}\,

where the θ1, ..., θq are the parameters of the model, μ is the expectation of X_t (often assumed to equal 0), and the \varepsilon_t, \varepsilon_{t-1},... are again, white noise error terms.

ARMA model

The notation ARMA(p, q) refers to the model with p autoregressive terms and q moving-average terms. This model contains the AR(p) and MA(q) models,

X_t = c + \varepsilon_t + \sum_{i=1}^p \varphi_i X_{t-i} + \sum_{i=1}^q \theta_i \varepsilon_{t-i}.\,

The general ARMA model was described in the 1951 thesis of Box–Jenkins) method for choosing and estimating them. This method was useful for low-order polynomials (of degree three or less).[3]

Note about the error terms

The error terms \varepsilon_t are generally assumed to be independent identically distributed random variables (i.i.d.) sampled from a normal distribution with zero mean: \varepsilon_t ~ N(0,σ2) where σ2 is the variance. These assumptions may be weakened but doing so will change the properties of the model. In particular, a change to the i.i.d. assumption would make a rather fundamental difference.

Specification in terms of lag operator

In some texts the models will be specified in terms of the lag operator L. In these terms then the AR(p) model is given by

\varepsilon_t = \left(1 - \sum_{i=1}^p \varphi_i L^i\right) X_t = \varphi (L) X_t\,

where \varphi represents the polynomial

\varphi (L) = 1 - \sum_{i=1}^p \varphi_i L^i.\,

The MA(q) model is given by

X_t = \left(1 + \sum_{i=1}^q \theta_i L^i\right) \varepsilon_t = \theta (L) \varepsilon_t , \,

where θ represents the polynomial

\theta(L)= 1 + \sum_{i=1}^q \theta_i L^i .\,

Finally, the combined ARMA(p, q) model is given by

\left(1 - \sum_{i=1}^p \varphi_i L^i\right) X_t = \left(1 + \sum_{i=1}^q \theta_i L^i\right) \varepsilon_t \, ,

or more concisely,

\varphi(L) X_t = \theta(L) \varepsilon_t \,


\frac{\varphi(L)}{\theta(L)}X_t = \varepsilon_t \, .

Alternative notation

Some authors, including Box, Jenkins & Reinsel use a different convention for the autoregression coefficients.[4] This allows all the polynomials involving the lag operator to appear in a similar form throughout. Thus the ARMA model would be written as

\left(1 + \sum_{i=1}^p \phi_i L^i\right) X_t = \left(1 + \sum_{i=1}^q \theta_i L^i\right) \varepsilon_t \, .

Moreover, if we set \phi_0 = \theta_0 = 1, then we get an even more elegant formulation: \sum_{i=0}^p \phi_i L^i \; X_t = \sum_{i=0}^q \theta_i L^i \; \varepsilon_t \, .

Fitting models

ARMA models in general can, after choosing p and q, be fitted by least squares regression to find the values of the parameters which minimize the error term. It is generally considered good practice to find the smallest values of p and q which provide an acceptable fit to the data. For a pure AR model the Yule-Walker equations may be used to provide a fit.

Finding appropriate values of p and q in the ARMA(p,q) model can be facilitated by plotting the partial autocorrelation functions for an estimate of p, and likewise using the autocorrelation functions for an estimate of q. Further information can be gleaned by considering the same functions for the residuals of a model fitted with an initial selection of p and q.

Brockwell & Davis recommend using AICc for finding p and q.[5]

Implementations in statistics packages

  • In R, the arima function (in standard package stats) is documented in ARIMA Modelling of Time Series. Extension packages contain related and extended functionality, e.g., the tseries package includes an arma function, documented in "Fit ARMA Models to Time Series"; the packagefracdiff contains fracdiff() for fractionally integrated ARMA processes, etc. The CRAN task view on Time Series contains links to most of these.
  • Mathematica has a complete library of time series functions including ARMA.[6]
  • MATLAB includes functions such as arma and ar to estimate AR, ARX (autoregressive exogenous), and ARMAX models. See System Identification Toolbox and Econometrics Toolbox for more information.
  • Statsmodels Python module includes many models and functions for time series analysis, including ARMA. Formerly part of Scikit-learn it is now stand-alone and integrates well with Pandas. See here for more details.
  • IMSL Numerical Libraries are libraries of numerical analysis functionality including ARMA and ARIMA procedures implemented in standard programming languages like C, Java, C# .NET, and Fortran.
  • gretl can also estimate ARMA model, see here where it's mentioned.
  • GNU Octave can estimate AR models using functions from the extra package octave-forge.
  • Stata includes the function arima which can estimate ARMA and ARIMA models. See here for more details.
  • SuanShu is a Java library of numerical methods, including comprehensive statistics packages, in which univariate/multivariate ARMA, ARIMA, ARMAX, etc. models are implemented in an object-oriented approach. These implementations are documented in "SuanShu, a Java numerical and statistical library".
  • SAS has an econometric package, ETS, that estimates ARIMA models. See here for more details.


ARMA is appropriate when a system is a function of a series of unobserved shocks (the MA part) as well as its own behavior. For example, stock prices may be shocked by fundamental information as well as exhibiting technical trending and mean-reversion effects due to market participants.


The dependence of Xt on past values and the error terms εt is assumed to be linear unless specified otherwise. If the dependence is nonlinear, the model is specifically called a nonlinear moving average (NMA), nonlinear autoregressive (NAR), or nonlinear autoregressive–moving-average (NARMA) model.

Autoregressive–moving-average models can be generalized in other ways. See also autoregressive conditional heteroskedasticity (ARCH) models and autoregressive integrated moving average (ARIMA) models. If multiple time series are to be fitted then a vector ARIMA (or VARIMA) model may be fitted. If the time-series in question exhibits long memory then fractional ARIMA (FARIMA, sometimes called ARFIMA) modelling may be appropriate: see Autoregressive fractionally integrated moving average. If the data is thought to contain seasonal effects, it may be modeled by a SARIMA (seasonal ARIMA) or a periodic ARMA model.

Another generalization is the multiscale autoregressive (MAR) model. A MAR model is indexed by the nodes of a tree, whereas a standard (discrete time) autoregressive model is indexed by integers.

Note that the ARMA model is a univariate model. Extensions for the multivariate case are the Vector Autoregression (VAR) and Vector Autoregression Moving-Average (VARMA).

Autoregressive–moving-average model with exogenous inputs model (ARMAX model)

The notation ARMAX(p, q, b) refers to the model with p autoregressive terms, q moving average terms and b exogenous inputs terms. This model contains the AR(p) and MA(q) models and a linear combination of the last b terms of a known and external time series d_t. It is given by:

X_t = \varepsilon_t + \sum_{i=1}^p \varphi_i X_{t-i} + \sum_{i=1}^q \theta_i \varepsilon_{t-i} + \sum_{i=0}^b \eta_i d_{t-i}.\,

where \eta_1, \ldots, \eta_b are the parameters of the exogenous input d_t.

Some nonlinear variants of models with exogenous variables have been defined: see for example Nonlinear autoregressive exogenous model.

Statistical packages implement the ARMAX model through the use of "exogenous" or "independent" variables. Care must be taken when interpreting the output of those packages, because the estimated parameters usually (for example, in R[7] and gretl) refer to the regression:

X_t - m_t = \varepsilon_t + \sum_{i=1}^p \varphi_i (X_{t-i} - m_{t-i}) + \sum_{i=1}^q \theta_i \varepsilon_{t-i}.\,

where mt incorporates all exogenous (or independent) variables:

m_t = c + \sum_{i=0}^b \eta_i d_{t-i}.\,

See also


  1. ^  
  2. ^ Whittle, P. (1951). Hypothesis Testing in Time Series Analysis. Almquist and Wicksell.  Whittle, P. (1963). Prediction and Regulation. English Universities Press.  
    Republished as: Whittle, P. (1983). Prediction and Regulation by Linear Least-Square Methods. University of Minnesota Press.  
  3. ^ Hannan & Deistler (1988, p. 227):  
  4. ^ Box, George; Jenkins, Gwilym M.; Reinsel, Gregory C. (1994). Time Series Analysis: Forecasting and Control (Third ed.). Prentice-Hall.  
  5. ^ Brockwell, P. J.; Davis, R. A. (2009). Time Series: Theory and Methods (2nd ed.). New York: Springer. p. 273.  
  6. ^ Time series features in Mathematica
  7. ^ ARIMA Modelling of Time Series, R documentation

Further reading

  • Mills, Terence C. (1990). Time Series Techniques for Economists. New York: Cambridge University Press.  
  • Percival, Donald B.; Walden, Andrew T. (1993). Spectral Analysis for Physical Applications. New York: Cambridge University Press.  
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.