Jump to content

Autoregressive moving-average model: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rescuing 2 sources and tagging 0 as dead. #IABot (v1.2.5)
Line 91: Line 91:
=== Implementations in statistics packages ===
=== Implementations in statistics packages ===
* In [[R (programming language)|R]], the ''arima'' function (in standard package ''stats'') is documented in [http://search.r-project.org/R/library/stats/html/arima.html ARIMA Modelling of Time Series]. Extension packages contain related and extended functionality, e.g., the ''tseries'' package includes an ''arma'' function, documented in [http://finzi.psych.upenn.edu/R/library/tseries/html/arma.html "Fit ARMA Models to Time Series"]; the [https://cran.r-project.org/web/packages/fracdiff ''fracdiff'' package] contains ''fracdiff()'' for fractionally integrated ARMA processes, etc. The CRAN task view on [https://cran.r-project.org/web/views/TimeSeries.html Time Series] contains links to most of these.
* In [[R (programming language)|R]], the ''arima'' function (in standard package ''stats'') is documented in [http://search.r-project.org/R/library/stats/html/arima.html ARIMA Modelling of Time Series]. Extension packages contain related and extended functionality, e.g., the ''tseries'' package includes an ''arma'' function, documented in [http://finzi.psych.upenn.edu/R/library/tseries/html/arma.html "Fit ARMA Models to Time Series"]; the [https://cran.r-project.org/web/packages/fracdiff ''fracdiff'' package] contains ''fracdiff()'' for fractionally integrated ARMA processes, etc. The CRAN task view on [https://cran.r-project.org/web/views/TimeSeries.html Time Series] contains links to most of these.
* [[Mathematica]] has a complete library of time series functions including ARMA.<ref>[http://www.wolfram.com/products/applications/timeseries/features.html Time series features in Mathematica]</ref>
* [[Mathematica]] has a complete library of time series functions including ARMA.<ref>[http://www.wolfram.com/products/applications/timeseries/features.html Time series features in Mathematica] {{wayback|url=http://www.wolfram.com/products/applications/timeseries/features.html |date=20111124032002 }}</ref>
* [[MATLAB]] includes functions such as [http://www.mathworks.com/help/econ/arma-model.html ''arma''] and [http://www.mathworks.com/help/ident/ref/ar.html ''ar''] to estimate AR, ARX (autoregressive exogenous), and ARMAX models. See [http://www.mathworks.com/help/ident/ug/estimating-ar-and-arma-models.html System Identification Toolbox] and [http://www.mathworks.com/help/econ/arima.estimate.html Econometrics Toolbox] for more information.
* [[MATLAB]] includes functions such as [http://www.mathworks.com/help/econ/arma-model.html ''arma''] and [http://www.mathworks.com/help/ident/ref/ar.html ''ar''] to estimate AR, ARX (autoregressive exogenous), and ARMAX models. See [http://www.mathworks.com/help/ident/ug/estimating-ar-and-arma-models.html System Identification Toolbox] and [http://www.mathworks.com/help/econ/arima.estimate.html 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 (software)|Pandas]]. [http://statsmodels.sourceforge.net/ See here for more details].
* [[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 (software)|Pandas]]. [http://statsmodels.sourceforge.net/ See here for more details].

Revision as of 07:56, 22 October 2016

In the statistical analysis of time series, autoregressive–moving-average (ARMA) models provide a parsimonious description of a (weakly) stationary stochastic process in terms of two polynomials, one for the autoregression and the second for the moving average. The general ARMA model was described in the 1951 thesis of Peter Whittle, Hypothesis testing in time series analysis, and it was popularized in the 1971 book by George E. P. Box and 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 AR part involves regressing the variable on its own lagged (i.e., past) values. The MA part involves modeling the error term as a linear combination of error terms occurring contemporaneously and at various times in the past.

The model is usually 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).

ARIMA models can be estimated following the Box-Jenkins approach.

Autoregressive model

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

where are parameters, is a constant, and the random variable 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:

where the θ1, ..., θq are the parameters of the model, μ is the expectation of (often assumed to equal 0), and the , ,... 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,

The general ARMA model was described in the 1951 thesis of Peter Whittle, who used mathematical analysis (Laurent series and Fourier analysis) and statistical inference.[1][2] ARMA models were popularized by a 1971 book by George E. P. Box and Jenkins, who expounded an iterative (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 are generally assumed to be independent identically distributed random variables (i.i.d.) sampled from a normal distribution with zero mean: ~ 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

where represents the polynomial

The MA(q) model is given by

where θ represents the polynomial

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

or more concisely,

or

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

Moreover, if we set , then we get an even more elegant formulation:

Fitting models

ARMA models in general cannot be, after choosing p and q, 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

Applications

ARMA is appropriate when a system is a function of a series of unobserved shocks (the MA part)[clarification needed] 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.

Generalizations

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 . It is given by:

where are the parameters of the exogenous input .

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:

where mt incorporates all exogenous (or independent) variables:

See also

References

  1. ^ Hannan, Edward James (1970). Multiple time series. Wiley series in probability and mathematical statistics. New York: John Wiley and Sons. {{cite book}}: Invalid |ref=harv (help)
  2. ^ Whittle, P. (1951). Hypothesis Testing in Time Series Analysis. Almquist and Wicksell. Whittle, P. (1963). Prediction and Regulation. English Universities Press. ISBN 0-8166-1147-5.
    Republished as: Whittle, P. (1983). Prediction and Regulation by Linear Least-Square Methods. University of Minnesota Press. ISBN 0-8166-1148-3.
  3. ^ Hannan & Deistler (1988, p. 227): Hannan, E. J.; Deistler, Manfred (1988). Statistical theory of linear systems. Wiley series in probability and mathematical statistics. New York: John Wiley and Sons. {{cite book}}: Invalid |ref=harv (help)
  4. ^ Box, George; Jenkins, Gwilym M.; Reinsel, Gregory C. (1994). Time Series Analysis: Forecasting and Control (Third ed.). Prentice-Hall. ISBN 0130607746.
  5. ^ Brockwell, P. J.; Davis, R. A. (2009). Time Series: Theory and Methods (2nd ed.). New York: Springer. p. 273. ISBN 9781441903198.
  6. ^ Time series features in Mathematica Archived 2011-11-24 at the Wayback Machine
  7. ^ ARIMA Modelling of Time Series, R documentation

Further reading

  • Mills, Terence C. (1990). Time Series Techniques for Economists. New York: Cambridge University Press. ISBN 0521343399.
  • Percival, Donald B.; Walden, Andrew T. (1993). Spectral Analysis for Physical Applications. New York: Cambridge University Press. ISBN 052135532X.