Autoregressive model

Last updated

In statistics, econometrics, and signal processing, an autoregressive (AR) model is a representation of a type of random process; as such, it can be used to describe certain time-varying processes in nature, economics, behavior, etc. The autoregressive model specifies that the output variable depends linearly on its own previous values and on a stochastic term (an imperfectly predictable term); thus the model is in the form of a stochastic difference equation (or recurrence relation) which should not be confused with a differential equation. Together with the moving-average (MA) model, it is a special case and key component of the more general autoregressive–moving-average (ARMA) and autoregressive integrated moving average (ARIMA) models of time series, which have a more complicated stochastic structure; it is also a special case of the vector autoregressive model (VAR), which consists of a system of more than one interlocking stochastic difference equation in more than one evolving random variable.

Contents

Contrary to the moving-average (MA) model, the autoregressive model is not always stationary as it may contain a unit root.

Large language models are called autoregressive, but they are not a classical autoregressive model in this sense because they are not linear.

Definition

The notation indicates an autoregressive model of order p. The AR(p) model is defined as

where are the parameters of the model, and is white noise. [1] [2] This can be equivalently written using the backshift operator B as

so that, moving the summation term to the left side and using polynomial notation, we have

An autoregressive model can thus be viewed as the output of an all-pole infinite impulse response filter whose input is white noise.

Some parameter constraints are necessary for the model to remain weak-sense stationary. For example, processes in the AR(1) model with are not stationary. More generally, for an AR(p) model to be weak-sense stationary, the roots of the polynomial must lie outside the unit circle, i.e., each (complex) root must satisfy (see pages 89,92 [3] ).

Intertemporal effect of shocks

In an AR process, a one-time shock affects values of the evolving variable infinitely far into the future. For example, consider the AR(1) model . A non-zero value for at say time t=1 affects by the amount . Then by the AR equation for in terms of , this affects by the amount . Then by the AR equation for in terms of , this affects by the amount . Continuing this process shows that the effect of never ends, although if the process is stationary then the effect diminishes toward zero in the limit.

Because each shock affects X values infinitely far into the future from when they occur, any given value Xt is affected by shocks occurring infinitely far into the past. This can also be seen by rewriting the autoregression

(where the constant term has been suppressed by assuming that the variable has been measured as deviations from its mean) as

When the polynomial division on the right side is carried out, the polynomial in the backshift operator applied to has an infinite order—that is, an infinite number of lagged values of appear on the right side of the equation.

Characteristic polynomial

The autocorrelation function of an AR(p) process can be expressed as [ citation needed ]

where are the roots of the polynomial

where B is the backshift operator, where is the function defining the autoregression, and where are the coefficients in the autoregression. The formula is valid only if all the roots have multiplicity 1.[ citation needed ]

The autocorrelation function of an AR(p) process is a sum of decaying exponentials.

Graphs of AR(p) processes

AR(0); AR(1) with AR parameter 0.3; AR(1) with AR parameter 0.9; AR(2) with AR parameters 0.3 and 0.3; and AR(2) with AR parameters 0.9 and -0.8 ArTimeSeries.svg
AR(0); AR(1) with AR parameter 0.3; AR(1) with AR parameter 0.9; AR(2) with AR parameters 0.3 and 0.3; and AR(2) with AR parameters 0.9 and −0.8

The simplest AR process is AR(0), which has no dependence between the terms. Only the error/innovation/noise term contributes to the output of the process, so in the figure, AR(0) corresponds to white noise.

For an AR(1) process with a positive , only the previous term in the process and the noise term contribute to the output. If is close to 0, then the process still looks like white noise, but as approaches 1, the output gets a larger contribution from the previous term relative to the noise. This results in a "smoothing" or integration of the output, similar to a low pass filter.

For an AR(2) process, the previous two terms and the noise term contribute to the output. If both and are positive, the output will resemble a low pass filter, with the high frequency part of the noise decreased. If is positive while is negative, then the process favors changes in sign between terms of the process. The output oscillates. This can be likened to edge detection or detection of change in direction.

Example: An AR(1) process

An AR(1) process is given by:where is a white noise process with zero mean and constant variance . (Note: The subscript on has been dropped.) The process is weak-sense stationary if since it is obtained as the output of a stable filter whose input is white noise. (If then the variance of depends on time lag t, so that the variance of the series diverges to infinity as t goes to infinity, and is therefore not weak sense stationary.) Assuming , the mean is identical for all values of t by the very definition of weak sense stationarity. If the mean is denoted by , it follows fromthatand hence

The variance is

where is the standard deviation of . This can be shown by noting that

and then by noticing that the quantity above is a stable fixed point of this relation.

The autocovariance is given by

It can be seen that the autocovariance function decays with a decay time (also called time constant) of . [4]

The spectral density function is the Fourier transform of the autocovariance function. In discrete terms this will be the discrete-time Fourier transform:

This expression is periodic due to the discrete nature of the , which is manifested as the cosine term in the denominator. If we assume that the sampling time () is much smaller than the decay time (), then we can use a continuum approximation to :

which yields a Lorentzian profile for the spectral density:

where is the angular frequency associated with the decay time .

An alternative expression for can be derived by first substituting for in the defining equation. Continuing this process N times yields

For N approaching infinity, will approach zero and:

It is seen that is white noise convolved with the kernel plus the constant mean. If the white noise is a Gaussian process then is also a Gaussian process. In other cases, the central limit theorem indicates that will be approximately normally distributed when is close to one.

For , the process will be a geometric progression (exponential growth or decay). In this case, the solution can be found analytically: whereby is an unknown constant (initial condition).

Explicit mean/difference form of AR(1) process

The AR(1) model is the discrete-time analogy of the continuous Ornstein-Uhlenbeck process. It is therefore sometimes useful to understand the properties of the AR(1) model cast in an equivalent form. In this form, the AR(1) model, with process parameter , is given by

, where , is the model mean, and is a white-noise process with zero mean and constant variance .

By rewriting this as and then deriving (by induction) , one can show that

and
.

Choosing the maximum lag

The partial autocorrelation of an AR(p) process equals zero at lags larger than p, so the appropriate maximum lag p is the one after which the partial autocorrelations are all zero.

Calculation of the AR parameters

There are many ways to estimate the coefficients, such as the ordinary least squares procedure or method of moments (through Yule–Walker equations).

The AR(p) model is given by the equation

It is based on parameters where i = 1, ..., p. There is a direct correspondence between these parameters and the covariance function of the process, and this correspondence can be inverted to determine the parameters from the autocorrelation function (which is itself obtained from the covariances). This is done using the Yule–Walker equations.

Yule–Walker equations

The Yule–Walker equations, named for Udny Yule and Gilbert Walker, [5] [6] are the following set of equations. [7]

where m = 0, …, p, yielding p + 1 equations. Here is the autocovariance function of Xt, is the standard deviation of the input noise process, and is the Kronecker delta function.

Because the last part of an individual equation is non-zero only if m = 0, the set of equations can be solved by representing the equations for m > 0 in matrix form, thus getting the equation

which can be solved for all The remaining equation for m = 0 is

which, once are known, can be solved for

An alternative formulation is in terms of the autocorrelation function. The AR parameters are determined by the first p+1 elements of the autocorrelation function. The full autocorrelation function can then be derived by recursively calculating [8]

Examples for some Low-order AR(p) processes

Estimation of AR parameters

The above equations (the Yule–Walker equations) provide several routes to estimating the parameters of an AR(p) model, by replacing the theoretical covariances with estimated values. [9] Some of these variants can be described as follows:

Here predicted values of Xt would be based on the p future values of the same series.[ clarification needed ] This way of estimating the AR parameters is due to John Parker Burg, [10] and is called the Burg method: [11] Burg and later authors called these particular estimates "maximum entropy estimates", [12] but the reasoning behind this applies to the use of any set of estimated AR parameters. Compared to the estimation scheme using only the forward prediction equations, different estimates of the autocovariances are produced, and the estimates have different stability properties. Burg estimates are particularly associated with maximum entropy spectral estimation. [13]

Other possible approaches to estimation include maximum likelihood estimation. Two distinct variants of maximum likelihood are available: in one (broadly equivalent to the forward prediction least squares scheme) the likelihood function considered is that corresponding to the conditional distribution of later values in the series given the initial p values in the series; in the second, the likelihood function considered is that corresponding to the unconditional joint distribution of all the values in the observed series. Substantial differences in the results of these approaches can occur if the observed series is short, or if the process is close to non-stationarity.

Spectrum

AutocorrTimeAr.svg
AutoCorrAR.svg

The power spectral density (PSD) of an AR(p) process with noise variance is [8]

AR(0)

For white noise (AR(0))

AR(1)

For AR(1)

AR(2)

The behavior of an AR(2) process is determined entirely by the roots of it characteristic equation, which is expressed in terms of the lag operator as:

or equivalently by the poles of its transfer function, which is defined in the Z domain by:

It follows that the poles are values of z satisfying:

,

which yields:

.

and are the reciprocals of the characteristic roots, as well as the eigenvalues of the temporal update matrix:

AR(2) processes can be split into three groups depending on the characteristics of their roots/poles:

with bandwidth about the peak inversely proportional to the moduli of the poles:

The terms involving square roots are all real in the case of complex poles since they exist only when .

Otherwise the process has real roots, and:

The process is non-stationary when the poles are on or outside the unit circle, or equivalently when the characteristic roots are on or inside the unit circle. The process is stable when the poles are strictly within the unit circle (roots strictly outside the unit circle), or equivalently when the coefficients are in the triangle .

The full PSD function can be expressed in real form as:

Implementations in statistics packages

Impulse response

The impulse response of a system is the change in an evolving variable in response to a change in the value of a shock term k periods earlier, as a function of k. Since the AR model is a special case of the vector autoregressive model, the computation of the impulse response in vector autoregression#impulse response applies here.

n-step-ahead forecasting

Once the parameters of the autoregression

have been estimated, the autoregression can be used to forecast an arbitrary number of periods into the future. First use t to refer to the first period for which data is not yet available; substitute the known preceding values Xt-i for i=1, ..., p into the autoregressive equation while setting the error term equal to zero (because we forecast Xt to equal its expected value, and the expected value of the unobserved error term is zero). The output of the autoregressive equation is the forecast for the first unobserved period. Next, use t to refer to the next period for which data is not yet available; again the autoregressive equation is used to make the forecast, with one difference: the value of X one period prior to the one now being forecast is not known, so its expected value—the predicted value arising from the previous forecasting step—is used instead. Then for future periods the same procedure is used, each time using one more forecast value on the right side of the predictive equation until, after p predictions, all p right-side values are predicted values from preceding steps.

There are four sources of uncertainty regarding predictions obtained in this manner: (1) uncertainty as to whether the autoregressive model is the correct model; (2) uncertainty about the accuracy of the forecasted values that are used as lagged values in the right side of the autoregressive equation; (3) uncertainty about the true values of the autoregressive coefficients; and (4) uncertainty about the value of the error term for the period being predicted. Each of the last three can be quantified and combined to give a confidence interval for the n-step-ahead predictions; the confidence interval will become wider as n increases because of the use of an increasing number of estimated values for the right-side variables.

See also

Notes

  1. Box, George E. P. (1994). Time series analysis : forecasting and control. Gwilym M. Jenkins, Gregory C. Reinsel (3rd ed.). Englewood Cliffs, N.J.: Prentice Hall. p. 54. ISBN   0-13-060774-6. OCLC   28888762.
  2. Shumway, Robert H. (2000). Time series analysis and its applications. David S. Stoffer. New York: Springer. pp. 90–91. ISBN   0-387-98950-1. OCLC   42392178. Archived from the original on 2023-04-16. Retrieved 2022-09-03.
  3. Shumway, Robert H.; Stoffer, David (2010). Time series analysis and its applications : with R examples (3rd ed.). Springer. ISBN   978-1441978646.
  4. Lai, Dihui; and Lu, Bingfeng; "Understanding Autoregressive Model for Time Series as a Deterministic Dynamic System" Archived 2023-03-24 at the Wayback Machine , in Predictive Analytics and Futurism, June 2017, number 15, June 2017, pages 7-9
  5. Yule, G. Udny (1927) "On a Method of Investigating Periodicities in Disturbed Series, with Special Reference to Wolfer's Sunspot Numbers" Archived 2011-05-14 at the Wayback Machine , Philosophical Transactions of the Royal Society of London, Ser. A, Vol. 226, 267–298.]
  6. Walker, Gilbert (1931) "On Periodicity in Series of Related Terms" Archived 2011-06-07 at the Wayback Machine , Proceedings of the Royal Society of London, Ser. A, Vol. 131, 518–532.
  7. Theodoridis, Sergios (2015-04-10). "Chapter 1. Probability and Stochastic Processes". Machine Learning: A Bayesian and Optimization Perspective. Academic Press, 2015. pp. 9–51. ISBN   978-0-12-801522-3.
  8. 1 2 Von Storch, Hans; Zwiers, Francis W. (2001). Statistical analysis in climate research. Cambridge University Press. doi:10.1017/CBO9780511612336. ISBN   0-521-01230-9.[ page needed ]
  9. Eshel, Gidon. "The Yule Walker Equations for the AR Coefficients" (PDF). stat.wharton.upenn.edu. Archived (PDF) from the original on 2018-07-13. Retrieved 2019-01-27.
  10. Burg, John Parker (1968); "A new analysis technique for time series data", in Modern Spectrum Analysis (Edited by D. G. Childers), NATO Advanced Study Institute of Signal Processing with emphasis on Underwater Acoustics. IEEE Press, New York.
  11. Brockwell, Peter J.; Dahlhaus, Rainer; Trindade, A. Alexandre (2005). "Modified Burg Algorithms for Multivariate Subset Autoregression" (PDF). Statistica Sinica. 15: 197–213. Archived from the original (PDF) on 2012-10-21.
  12. Burg, John Parker (1967) "Maximum Entropy Spectral Analysis", Proceedings of the 37th Meeting of the Society of Exploration Geophysicists, Oklahoma City, Oklahoma.
  13. Bos, Robert; De Waele, Stijn; Broersen, Piet M. T. (2002). "Autoregressive spectral estimation by application of the Burg algorithm to irregularly sampled data". IEEE Transactions on Instrumentation and Measurement. 51 (6): 1289. Bibcode:2002ITIM...51.1289B. doi:10.1109/TIM.2002.808031. Archived from the original on 2023-04-16. Retrieved 2019-12-11.
  14. "Fit Autoregressive Models to Time Series" Archived 2016-01-28 at the Wayback Machine (in R)
  15. Stoffer, David; Poison, Nicky (2023-01-09), astsa: Applied Statistical Time Series Analysis , retrieved 2023-08-20
  16. "Econometrics Toolbox". www.mathworks.com. Archived from the original on 2023-04-16. Retrieved 2022-02-16.
  17. "System Identification Toolbox". www.mathworks.com. Archived from the original on 2022-02-16. Retrieved 2022-02-16.
  18. "Autoregressive Model - MATLAB & Simulink". www.mathworks.com. Archived from the original on 2022-02-16. Retrieved 2022-02-16.
  19. "The Time Series Analysis (TSA) toolbox for Octave and Matlab®". pub.ist.ac.at. Archived from the original on 2012-05-11. Retrieved 2012-04-03.
  20. "christophmark/bayesloop". December 7, 2021. Archived from the original on September 28, 2020. Retrieved September 4, 2018 via GitHub.
  21. "statsmodels.tsa.ar_model.AutoReg — statsmodels 0.12.2 documentation". www.statsmodels.org. Archived from the original on 2021-02-28. Retrieved 2021-04-29.

Related Research Articles

<span class="mw-page-title-main">Pauli matrices</span> Matrices important in quantum mechanics and the study of spin

In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices that are Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

<span class="mw-page-title-main">Navier–Stokes equations</span> Equations describing the motion of viscous fluid substances

The Navier–Stokes equations are partial differential equations which describe the motion of viscous fluid substances. They were named after French engineer and physicist Claude-Louis Navier and the Irish physicist and mathematician George Gabriel Stokes. They were developed over several decades of progressively building the theories, from 1822 (Navier) to 1842–1850 (Stokes).

<span class="mw-page-title-main">Noether's theorem</span> Statement relating differentiable symmetries to conserved quantities

Noether's theorem states that every continuous symmetry of the action of a physical system with conservative forces has a corresponding conservation law. This is the first of two theorems proven by mathematician Emmy Noether in 1915 and published in 1918. The action of a physical system is the integral over time of a Lagrangian function, from which the system's behavior can be determined by the principle of least action. This theorem only applies to continuous and smooth symmetries of physical space.

In continuum mechanics, the infinitesimal strain theory is a mathematical approach to the description of the deformation of a solid body in which the displacements of the material particles are assumed to be much smaller than any relevant dimension of the body; so that its geometry and the constitutive properties of the material at each point of space can be assumed to be unchanged by the deformation.

Linear elasticity is a mathematical model of how solid objects deform and become internally stressed due to prescribed loading conditions. It is a simplification of the more general nonlinear theory of elasticity and a branch of continuum mechanics.

<span class="mw-page-title-main">Granular material</span> Conglomeration of discrete solid, macroscopic particles

A granular material is a conglomeration of discrete solid, macroscopic particles characterized by a loss of energy whenever the particles interact. The constituents that compose granular material are large enough such that they are not subject to thermal motion fluctuations. Thus, the lower size limit for grains in granular material is about 1 μm. On the upper size limit, the physics of granular materials may be applied to ice floes where the individual grains are icebergs and to asteroid belts of the Solar System with individual grains being asteroids.

Geometrical optics, or ray optics, is a model of optics that describes light propagation in terms of rays. The ray in geometrical optics is an abstraction useful for approximating the paths along which light propagates under certain circumstances.

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 (AR) and the second for the moving average (MA). 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 1970 book by George E. P. Box and Gwilym Jenkins.

In physics, the Hamilton–Jacobi equation, named after William Rowan Hamilton and Carl Gustav Jacob Jacobi, is an alternative formulation of classical mechanics, equivalent to other formulations such as Newton's laws of motion, Lagrangian mechanics and Hamiltonian mechanics.

<span class="mw-page-title-main">Debye–Hückel equation</span> Electrochemical equation

The chemists Peter Debye and Erich Hückel noticed that solutions that contain ionic solutes do not behave ideally even at very low concentrations. So, while the concentration of the solutes is fundamental to the calculation of the dynamics of a solution, they theorized that an extra factor that they termed gamma is necessary to the calculation of the activities of the solution. Hence they developed the Debye–Hückel equation and Debye–Hückel limiting law. The activity is only proportional to the concentration and is altered by a factor known as the activity coefficient . This factor takes into account the interaction energy of ions in solution.

The Newman–Penrose (NP) formalism is a set of notation developed by Ezra T. Newman and Roger Penrose for general relativity (GR). Their notation is an effort to treat general relativity in terms of spinor notation, which introduces complex forms of the usual variables used in GR. The NP formalism is itself a special case of the tetrad formalism, where the tensors of the theory are projected onto a complete vector basis at each point in spacetime. Usually this vector basis is chosen to reflect some symmetry of the spacetime, leading to simplified expressions for physical observables. In the case of the NP formalism, the vector basis chosen is a null tetrad: a set of four null vectors—two real, and a complex-conjugate pair. The two real members often asymptotically point radially inward and radially outward, and the formalism is well adapted to treatment of the propagation of radiation in curved spacetime. The Weyl scalars, derived from the Weyl tensor, are often used. In particular, it can be shown that one of these scalars— in the appropriate frame—encodes the outgoing gravitational radiation of an asymptotically flat system.

In mathematics and economics, transportation theory or transport theory is a name given to the study of optimal transportation and allocation of resources. The problem was formalized by the French mathematician Gaspard Monge in 1781.

The Debye–Hückel theory was proposed by Peter Debye and Erich Hückel as a theoretical explanation for departures from ideality in solutions of electrolytes and plasmas. It is a linearized Poisson–Boltzmann model, which assumes an extremely simplified model of electrolyte solution but nevertheless gave accurate predictions of mean activity coefficients for ions in dilute solution. The Debye–Hückel equation provides a starting point for modern treatments of non-ideality of electrolyte solutions.

<span class="mw-page-title-main">Mathematical descriptions of the electromagnetic field</span> Formulations of electromagnetism

There are various mathematical descriptions of the electromagnetic field that are used in the study of electromagnetism, one of the four fundamental interactions of nature. In this article, several approaches are discussed, although the equations are in terms of electric and magnetic fields, potentials, and charges with currents, generally speaking.

In linear elasticity, the equations describing the deformation of an elastic body subject only to surface forces on the boundary are the equilibrium equation:

<span class="mw-page-title-main">Plate theory</span> Mathematical model of the stresses within flat plates under loading

In continuum mechanics, plate theories are mathematical descriptions of the mechanics of flat plates that draw on the theory of beams. Plates are defined as plane structural elements with a small thickness compared to the planar dimensions. The typical thickness to width ratio of a plate structure is less than 0.1. A plate theory takes advantage of this disparity in length scale to reduce the full three-dimensional solid mechanics problem to a two-dimensional problem. The aim of plate theory is to calculate the deformation and stresses in a plate subjected to loads.

<span class="mw-page-title-main">Uflyand-Mindlin plate theory</span>

The Reissner–Mindlin theory of plates is an extension of Kirchhoff–Love plate theory that takes into account shear deformations through-the-thickness of a plate. The theory was proposed in 1951 by Raymond Mindlin. A similar, but not identical, theory in static setting, had been proposed earlier by Eric Reissner in 1945. Both theories are intended for thick plates in which the normal to the mid-surface remains straight but not necessarily perpendicular to the mid-surface. The Reissner-Mindlin theory is used to calculate the deformations and stresses in a plate whose thickness is of the order of one tenth the planar dimensions while the Kirchhoff–Love theory is applicable to thinner plates.

In representation theory of mathematics, the Waldspurger formula relates the special values of two L-functions of two related admissible irreducible representations. Let k be the base field, f be an automorphic form over k, π be the representation associated via the Jacquet–Langlands correspondence with f. Goro Shimura (1976) proved this formula, when and f is a cusp form; Günter Harder made the same discovery at the same time in an unpublished paper. Marie-France Vignéras (1980) proved this formula, when and f is a newform. Jean-Loup Waldspurger, for whom the formula is named, reproved and generalized the result of Vignéras in 1985 via a totally different method which was widely used thereafter by mathematicians to prove similar formulas.

Phase reduction is a method used to reduce a multi-dimensional dynamical equation describing a nonlinear limit cycle oscillator into a one-dimensional phase equation. Many phenomena in our world such as chemical reactions, electric circuits, mechanical vibrations, cardiac cells, and spiking neurons are examples of rhythmic phenomena, and can be considered as nonlinear limit cycle oscillators.

<span class="mw-page-title-main">Nonlinear dispersion relation</span> Relation assigning the phase velocity

A nonlinear dispersion relation (NDR) is a dispersion relation that assigns the correct phase velocity to a nonlinear wave structure. As an example of how diverse and intricate the underlying description can be, we deal with plane electrostatic wave structures which propagate with in a collisionless plasma. Such structures are ubiquitous, for example in the magnetosphere of the Earth, in fusion reactors or in the laboratory. Correct means that this must be done according to the governing equations, in this case the Vlasov-Poisson system, and the conditions prevailing in the plasma during the wave formation process. This means that special attention must be paid to the particle trapping processes acting on the resonant electrons and ions, which requires phase space analyses. Since the latter is stochastic, transient and rather filamentary in nature, the entire dynamic trapping process eludes mathematical treatment, so that it can be adequately taken into account “only” in the asymptotic, quiet regime of wave generation, when the structure is close to equilibrium.

References