WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

ARProcess [{a1,,ap},v]

represents a weakly stationary autoregressive process of order p with normal white noise variance v.

ARProcess [{a1,,ap},Σ]

represents a weakly stationary vector AR process with multinormal white noise covariance matrix Σ.

ARProcess [{a1,,ap},v,init]

represents an AR process with initial data init.

ARProcess [c,]

represents an AR process with a constant c.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Covariance and Spectrum  
Stationarity and Invertibility  
Estimation Methods  
Process Slice Properties  
Representations  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
History
Cite this Page

ARProcess [{a1,,ap},v]

represents a weakly stationary autoregressive process of order p with normal white noise variance v.

ARProcess [{a1,,ap},Σ]

represents a weakly stationary vector AR process with multinormal white noise covariance matrix Σ.

ARProcess [{a1,,ap},v,init]

represents an AR process with initial data init.

ARProcess [c,]

represents an AR process with a constant c.

Details

  • ARProcess is also known as AR or VAR (vector AR).
  • ARProcess is a discrete-time and continuous-state random process.
  • The AR process is described by the difference equation , where is the state output, is the white noise input, is the shift operator, and the constant c is taken to be zero if not specified.
  • The initial data init can be given as a list {,y[-2],y[-1]} or a single-path TemporalData object with time stamps understood as {,-2,-1}.
  • A scalar AR process can have real coefficients ai and c, a positive variance v, and a non-negative integer order p.
  • An -dimensional vector AR process can have real coefficient matrices ai of dimensions ×, real vector c of length , and the covariance matrix Σ should be symmetric positive definite of dimensions ×.
  • The AR process with zero constant has transfer function , where:
  • scalar process
    vector process; is the × identity matrix
  • ARProcess [tproc,p] for a time series process tproc gives an AR process of order p such that the series expansions about zero of the corresponding transfer functions agree up to degree p.
  • Possible time series processes tproc include ARProcess , ARMAProcess , and SARIMAProcess .
  • ARProcess [p] represents an autoregressive process of order p for use in EstimatedProcess and related functions.
  • ARProcess can be used with such functions as CovarianceFunction , RandomFunction , and TimeSeriesForecast .

Examples

open all close all

Basic Examples  (3)

Simulate an AR process:

Wolfram Language code: data = RandomFunction[ARProcess[2, {.3, -.5}, .1], {1, 10 ^ 2}]
Wolfram Language code: ListPlot[data, Filling -> Axis]

Covariance function:

Wolfram Language code: CovarianceFunction[ARProcess[{a}, σ^2], s, t]
Wolfram Language code: DiscretePlot3D[CovarianceFunction[ARProcess[{.7, -.4, .5}, 1.], s, t], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]

Correlation function:

Wolfram Language code: DiscretePlot[CorrelationFunction[ARProcess[{.5, .1, .3, -.2}, 1], h], {h, 0, 20}, ExtentSize -> 1 / 2]

Partial correlation function:

Wolfram Language code: DiscretePlot[PartialCorrelationFunction[ARProcess[{.5, .1, .3, -.2}, 1], h], {h, 1, 9}, ExtentSize -> 1 / 2]

Scope  (38)

Basic Uses  (11)

Simulate an ensemble of paths:

Wolfram Language code: data = RandomFunction[ARProcess[1, {.5}, 1], {30}, 4]
Wolfram Language code: ListLinePlot[data, Filling -> Axis]

Simulate with given precision:

Wolfram Language code: RandomFunction[ARProcess[1, {2 / 10, 1 / 10}, 1 / 10], {1, 4}, WorkingPrecision -> 20]["Path"]

Simulate a first-order scalar process:

Wolfram Language code: sample[a_] := RandomFunction[ARProcess[{a}, .1], {1, 200}];

Sample paths for positive and negative values of the parameter:

Wolfram Language code: ListPlot[sample[#], Filling -> Axis, PlotLabel -> ("a = " ~~ ToString[#])]& /@ {-0.9, 0.9}

Compare the serial dependence between consecutive values on scatter plots:

Wolfram Language code: pairs[a_] := Transpose[{Most[#], Rest[#]}]&[sample[a]["Values"]];
Wolfram Language code: ListPlot[pairs[#], PlotLabel -> ("a = " ~~ ToString[#])]& /@ {-0.9, 0.9}

Simulate a weakly stationary process with given initial values:

Wolfram Language code: sproc[x_] := ARProcess[0, {.4, .3}, 1, {x}];
Wolfram Language code: pts = {-4, 0, 4, 8};
Wolfram Language code: samples = Table[SeedRandom[4];RandomFunction[sproc[x], {30}], {x, pts}];
Wolfram Language code: ListLinePlot[samples, DataRange -> {0, 12}, PlotLegends -> (StringJoin["x = ", ToString[#]]& /@ pts)]

For a process with a trend, initial values influence the behavior of the whole path:

Wolfram Language code: tproc[x_] := ARProcess[0, {1.1, -0.04}, 1, {x}];
Wolfram Language code: tsamples = Table[SeedRandom[4];RandomFunction[tproc[x], {30}], {x, pts}];
Wolfram Language code: ListLinePlot[tsamples, DataRange -> {0, 12}, PlotLegends -> (StringJoin["x = ", ToString[#]]& /@ pts)]

Simulate a two-dimensional process:

Wolfram Language code: α = {{.2, .1}, {-.3, .2}}; Σ = {{1.0, 0}, {0, 0.3}}; sample = RandomFunction[ARProcess[{α}, Σ], {1, 100}];

Create a 2D sample path function from the data:

Wolfram Language code: s = TimeSeries[sample, ResamplingMethod -> Automatic]; f = s["PathFunction"]; g[t_ ? NumericQ] := f[t]

The color of the path is the function of time:

Wolfram Language code: ParametricPlot[g[t], {t, 1, 100}, ColorFunction -> Function[{x, y, t}, (ColorData["BlueGreenYellow"][t])], PlotStyle -> Thick, AspectRatio -> 1, AxesLabel -> {x, y}]

Create a 3D sample path function with time:

Wolfram Language code: gg[t_ ? NumericQ] := Join[{t}, f[t]]

The color of the path is the function of time:

Wolfram Language code: ParametricPlot3D[gg[t], {t, 1, 100}, ColorFunction -> Function[{t, x, y}, (ColorData["BlueGreenYellow"][t])], PlotStyle -> Thick, BoxRatios -> 1, AxesLabel -> {t, x, y}]

Simulate a three-dimensional process:

Wolfram Language code: α = {{.2, .1, .1}, {-.3, .2, .1}, {-.3, .2, -.1}}; β = {{.2, .5, .1}, {-.2, .9, .5}, {.3, .1, -.4}}; Σ = {{1, 0, 0}, {0, .3, 0}, {0, 0, .1}}; SeedRandom[4];sample = RandomFunction[ARProcess[{α, β}, Σ], {1, 10 ^ 2}];

Create a sample path function from the data:

Wolfram Language code: s = TimeSeries[sample, ResamplingMethod -> Automatic];f = s["PathFunction"]; g[t_ ? NumericQ] := f[t]

The color of the path is the function of time:

Wolfram Language code: ParametricPlot3D[g[t], {t, 1, 100}, ColorFunction -> Function[{x, y, z, t}, (ColorData["BlueGreenYellow"][t])], PlotStyle -> Thick, BoxRatios -> 1, AxesLabel -> {x, y, z}]

Estimate process parameters:

Wolfram Language code: sample = RandomFunction[ARProcess[{.2, -.4}, .1], {1, 300}]; eproc = EstimatedProcess[sample, ARProcess[2]]

Compare the sample covariance functions with that of the estimated process:

Wolfram Language code: Show[ListPlot[CovarianceFunction[sample, {8}], Filling -> 0, PlotStyle -> PointSize[Medium]], DiscretePlot[CovarianceFunction[eproc, h], {h, 0, 8}, ExtentSize -> 1 / 2]]

Use TimeSeriesModel to automatically find orders:

Wolfram Language code: TimeSeriesModelFit[sample, "AR"]
Wolfram Language code: bestfit = %["BestFit"]

Compare the sample covariance functions with the best time series model:

Wolfram Language code: Show[ListPlot[CovarianceFunction[sample, {8}], Filling -> 0, PlotStyle -> PointSize[Medium]], DiscretePlot[CovarianceFunction[bestfit, h], {h, 0, 8}, ExtentSize -> 1 / 2]]

Find the maximum likelihood estimator:

Wolfram Language code: proc = ARProcess[1, {.3, .4}, 1];
Wolfram Language code: SeedRandom[23];data = RandomFunction[proc, {100}];

Fix the constant and the variance and estimate the remaining parameters:

Wolfram Language code: res = FindProcessParameters[data, ARProcess[1, {a, b}, 1], ProcessEstimator -> "MaximumLikelihood"]

Plot the log-likelihood function together with the position of the estimated parameters:

Wolfram Language code: logℒ[x_Real, y_Real] := LogLikelihood[ARProcess[1, {x, y}, 1], data]
Wolfram Language code: ContourPlot[logℒ[x, y], {x, 0.1, .49}, {y, 0.1, .49}, Epilog -> {Red, Point[{a, b} /. res]}]

Estimate a vector autoregressive process:

Wolfram Language code: proc = ARProcess[{1, 2}, {{{.2, .1}, {.5, .3}}}, {{1, .3}, {.3, .5}}]; data = RandomFunction[proc, {10 ^ 3}];
Wolfram Language code: eproc = EstimatedProcess[data, ARProcess[1]]

Compare covariance functions for each component:

Wolfram Language code: Table[Show[ListPlot[CovarianceFunction[data["PathComponent", i], {8}], Filling -> 0, PlotStyle -> PointSize[Medium], PlotRange -> All], DiscretePlot[CovarianceFunction[eproc, h][[i, i]], {h, 0, 8}, ExtentSize -> 1 / 2]], {i, 1, 2}]

Forecast future values:

Wolfram Language code: proc = ARProcess[2, {.1, .4}, .1]; sample = RandomFunction[proc, {1, 50}];

Find the forecast for the next 10 steps:

Wolfram Language code: forecast = TimeSeriesForecast[proc, sample, {10}]

Show the forecast path:

Wolfram Language code: forecast["Path"]

Plot the data and the forecasted values:

Wolfram Language code: ListLinePlot[{sample, forecast}, InterpolationOrder -> 0, Filling -> Axis]

Find a forecast for a vector-valued time series process:

Wolfram Language code: proc = ARProcess[{{{.3, .1}, {.9, .1}}, {{.2, -.4}, {.5, -.3}}}, {{1, .2}, {.2, .6}}]; data = RandomFunction[proc, {0, 15}];

Find the forecast for the next 10 steps:

Wolfram Language code: forecast = TimeSeriesForecast[proc, data, {10}]

Plot the data and the forecast for each component:

Wolfram Language code: Row@Table[ListLinePlot[#["PathComponent", j]& /@ {data, forecast}, PlotLabel -> Subscript[x, j], PlotLegends -> {"data", "forecast"}], {j, 1, 2}]

Covariance and Spectrum  (6)

For low order it is possible to find the closed form of the correlation function:

Wolfram Language code: CorrelationFunction[ARProcess[{a}, σ^2], h]//PiecewiseExpand
Wolfram Language code: CorrelationFunction[ARProcess[{1 / 3, 1 / 2}, σ^2], h]//FunctionExpand//PiecewiseExpand

Partial correlation function is zero for lags larger than the process order:

Wolfram Language code: PartialCorrelationFunction[ARProcess[{a, b}, σ^2], h]//Simplify[#, h ≠ 0 && Element[h, Integers]]&
Wolfram Language code: PartialCorrelationFunction[ARProcess[{a, b, c, d}, σ^2], 1]

Correlation matrix:

Wolfram Language code: Correlation[ARProcess[{a, b}, σ^2][{1, 2, 3}]]//Simplify//MatrixForm

Covariance matrix:

Wolfram Language code: Covariance[ARProcess[{a}, σ^2][{1, 2, 3}]]//Simplify//MatrixForm

Inverse of the covariance matrix of an ARProcess is symmetric multidiagonal:

Wolfram Language code: cov = Covariance[ARProcess[{1 / 7, 1 / 4, 1 / 5}, 1][Range[8]]]; Inverse[cov]//MatrixForm

Covariance function for a vector-valued process:

Wolfram Language code: Σ = {{Subscript[σ, 1]^2, ρ Subscript[σ, 1]Subscript[σ, 2]}, {ρ Subscript[σ, 1]Subscript[σ, 2], Subscript[σ, 2]^2}}; α = {{a, 0}, {0, b}};
Wolfram Language code: CovarianceFunction[ARProcess[{α}, Σ], h]//TraditionalForm

Power spectral density:

Wolfram Language code: Plot[PowerSpectralDensity[ARProcess[{.4, -.4, .3}, 1], w], {w, -π, π}, Filling -> Axis]
Wolfram Language code: PowerSpectralDensity[ARProcess[{a}, σ^2], w]

Vector ARMAProcess :

Wolfram Language code: a = {{1 / 9, 0}, {1 / 3, 1 / 2}}; b = {{1, 3 / 4}, {1 / 2, -1 / 4}}; Σ = {{1, 1 / 3}, {1 / 3, 1}}; proc = ARMAProcess[{a}, {b}, Σ];
Wolfram Language code: psd = PowerSpectralDensity[proc, ω]; psd//FullSimplify//MatrixForm

Stationarity and Invertibility  (4)

Check if a time series process is weakly stationary:

Wolfram Language code: WeakStationarity[ARProcess[.3, {1, 2}, 1, {}]]

For a vector process:

Wolfram Language code: WeakStationarity[ARProcess[{{{.3, .2}, {-.4, .1}}}, {{1, .3}, {.3, .6}}]]

Find conditions for a process to be weakly stationary:

Wolfram Language code: cond2D = WeakStationarity[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2]]
Wolfram Language code: RegionPlot[cond2D, {Subscript[a, 1], -2, 2}, {Subscript[a, 2], -2, 2}, FrameLabel -> Automatic]

Find conditions for higher order:

Wolfram Language code: cond3D = WeakStationarity[ARProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, σ^2]]
Wolfram Language code: RegionPlot3D[Simplify@cond3D, {Subscript[a, 1], -2, 2}, {Subscript[a, 2], -2, 2}, {Subscript[a, 3], -2, 2}, PlotPoints -> 40, AxesLabel -> Automatic]

Variance is positive only for a weakly stationary process:

Wolfram Language code: v = Variance[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, 1][∞]]//FullSimplify

Define stationarity conditions:

Wolfram Language code: cond = WeakStationarity[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, 1]]

Variance is positive, assuming weak stationarity:

Wolfram Language code: FullSimplify[v > 0, cond]

Autoregressive process is always invertible:

Wolfram Language code: TimeSeriesInvertibility[ARProcess[const, {Subscript[a, 1], Subscript[a, 2]}, σ^2]]

Estimation Methods  (6)

The available methods for estimating an ARProcess :

Wolfram Language code: methods = {Automatic, "MethodOfMoments", "MaximumConditionalLikelihood", "MaximumLikelihood", "SpectralEstimator", "MaximumEntropy"};
Wolfram Language code: SeedRandom[14]; data = RandomFunction[ARProcess[2, {.4, .2, .3}, 1], {100}];
Wolfram Language code: Grid[res = Table[{m, EstimatedProcess[data, ARProcess[3], ProcessEstimator -> m]}, {m, methods}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

Compare log-likelihoods:

Wolfram Language code: LogLikelihood[#[[2]], data]& /@ res

Method of moments admits the following solvers:

Wolfram Language code: solvers = {Automatic, "LevinsonDurbin", "LeastSquares", "FindRoot", "NSolve"};
Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: Grid[Table[{m, EstimatedProcess[data, ARProcess[3], ProcessEstimator -> {"MethodOfMoments", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

Use a general solver for moments when fixing or repeating parameters:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.4, b}, v], ProcessEstimator -> "MethodOfMoments"]

Maximum conditional likelihood method allows the following solvers:

Wolfram Language code: solvers = {Automatic, "FindMaximum", "NMaximize"};
Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: Grid[Table[{m, EstimatedProcess[data, ARProcess[3], ProcessEstimator -> {"MaximumConditionalLikelihood", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

This method allows for fixed parameters:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.1, b}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]

Some relations between parameters are also permitted:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {b, b}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]

Maximum likelihood method allows the following solvers:

Wolfram Language code: solvers = {Automatic, "FindMaximum", "NMaximize"};
Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: Grid[Table[{m, EstimatedProcess[data, ARProcess[2], ProcessEstimator -> {"MaximumLikelihood", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

This method allows for fixed parameters:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.1, b}, v], ProcessEstimator -> "MaximumLikelihood"]

Some relations between parameters are also permitted:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {b, b}, v], ProcessEstimator -> "MaximumLikelihood"]

Spectral estimator allows specification of windows used for PowerSpectralDensity calculation:

Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2, .1}, 1], {100}];
Wolfram Language code: Grid[Table[{m, EstimatedProcess[data, ARProcess[3], ProcessEstimator -> {"SpectralEstimator", "Window" -> m}]}, {m, {10, BartlettWindow, {3, HannWindow}}}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

Spectral estimator allows the following solvers:

Wolfram Language code: solvers = {Automatic, "FindMinimum", "NMinimize"};
Wolfram Language code: Grid[Table[{m, EstimatedProcess[data, ARProcess[2], ProcessEstimator -> {"SpectralEstimator", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]

This method allows for fixed parameters:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.1, b}, v], ProcessEstimator -> "SpectralEstimator"]

Some relations between parameters are also permitted:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {b, b}, v], ProcessEstimator -> "SpectralEstimator"]

Maximum entropy method:

Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: EstimatedProcess[data, ARProcess[2], ProcessEstimator -> "MaximumEntropy"]

It is also known as Burg method:

Wolfram Language code: EstimatedProcess[data, ARProcess[2], ProcessEstimator -> "Burg"]

Process Slice Properties  (5)

Univariate SliceDistribution :

Wolfram Language code: SliceDistribution[ARProcess[c, {a}, σ^2], t]//PDF[#, x]&

Multivariate slice distributions:

Wolfram Language code: SliceDistribution[ARProcess[{.2, .3}, 1], {s, s + 3}]//Mean
Wolfram Language code: SliceDistribution[ARProcess[{.2, .3}, 1], {1, 2, 3}]//Covariance

Slice distribution of a vector-valued time series:

Wolfram Language code: α = {{Subscript[a, 1], 0}, {0, Subscript[a, 2]}}; Σ = {{Subscript[σ, 1]^2, ρ Subscript[σ, 1]Subscript[σ, 2]}, {ρ Subscript[σ, 1]Subscript[σ, 2], Subscript[σ, 2]^2}};
Wolfram Language code: Mean[ARProcess[{c1, c2}, {α}, Σ][3]]
Wolfram Language code: Covariance[SliceDistribution[ARProcess[{c1, c2}, {α}, Σ], {1, 2, 3}]]//MatrixForm

First-order probability density function with zero initial conditions:

Wolfram Language code: pdf = PDF[ARProcess[c, {a}, σ^2, {}][t], x]//PiecewiseExpand//Simplify
Wolfram Language code: Plot[Evaluate@Table[pdf /. {c -> 1, a -> .7, σ -> 1}, {t, 1, 4}], {x, -3, 6}, Filling -> Axis, PlotLegends -> {"t = 1", "t = 2", "t = 3", "t = 4"}]

Stationary mean and variance:

Wolfram Language code: μ = Mean[ARProcess[c, {Subscript[a, 1], Subscript[a, 2]}, σ^2][∞]]
Wolfram Language code: v = Variance[ARProcess[c, {Subscript[a, 1], Subscript[a, 2]}, σ^2][∞]]

Compare with the density function of a normal distribution:

Wolfram Language code: PDF[NormalDistribution[μ, Sqrt[v]], x]
Wolfram Language code: FullSimplify[% - PDF[ARProcess[c, {Subscript[a, 1], Subscript[a, 2]}, σ^2][∞], x]]

Compute the expectation of an expression:

Wolfram Language code: Expectation[x[3] ^ 2, xARProcess[c, {Subscript[a, 1], Subscript[a, 2]}, σ^2]]

Calculate a probability:

Wolfram Language code: Probability[x[7] < 6, xARProcess[{a}, σ^2]]

Skewness and kurtosis functions are constant:

Wolfram Language code: Skewness[ARProcess[c, {a}, σ^2][t]]
Wolfram Language code: Kurtosis[ARProcess[c, {Subscript[a, 1], Subscript[a, 2]}, σ^2][t]]

Moment:

Wolfram Language code: Table[Moment[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], r], {r, 0, 5}]

Generating functions:

Wolfram Language code: CharacteristicFunction[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], w]
Wolfram Language code: MomentGeneratingFunction[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], w]

CentralMoment and its generating function:

Wolfram Language code: Table[CentralMoment[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], r], {r, 0, 5}]
Wolfram Language code: CentralMomentGeneratingFunction[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], w]

FactorialMoment has no closed form for symbolic order:

Wolfram Language code: Table[FactorialMoment[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], r], {r, 0, 5}]
Wolfram Language code: FactorialMomentGeneratingFunction[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], w]

Cumulant and its generating function:

Wolfram Language code: Table[Cumulant[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], r], {r, 0, 5}]
Wolfram Language code: CumulantGeneratingFunction[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2][t], w]

Representations  (6)

Approximate an MA process with an AR process of order 3:

Wolfram Language code: proc = MAProcess[.4, {.2, .3, -.1}, 1]; aproc = ARProcess[proc, 3]

Compare the covariance function for the original and the approximate processes:

Wolfram Language code: DiscretePlot[CovarianceFunction[#, h], {h, 0, 10}, ExtentSize -> 1 / 2, PlotLabel -> Head[#]]& /@ {proc, aproc}

Approximate a vector process:

Wolfram Language code: proc = MAProcess[{.4, .2}, {{{.2, .5}, {-.3, .5}}}, {{.6, .2}, {.2, .4}}]; aproc = ARProcess[proc, 3]

Approximate an ARMA process with an AR process:

Wolfram Language code: ARProcess[ARMAProcess[c, {Subscript[a, 1], Subscript[a, 2]}, {Subscript[b, 1], Subscript[b, 2], Subscript[b, 3]}, v], 2]

Approximate an ARMA with fixed initial values:

Wolfram Language code: proc = ARMAProcess[.4, {.2, -.3, -.2}, {.8, -.2, .7}, 1., {}]; aproc = ARProcess[proc, 3]

Compare sample paths:

Wolfram Language code: SeedRandom[13];sample = RandomFunction[proc, {100}]; SeedRandom[13];asample = RandomFunction[aproc, {100}]; ListLinePlot[{sample, asample}, PlotLegends -> {"ARMA", "AR"}]

Approximate a SARIMA process with an AR process:

Wolfram Language code: proc = SARIMAProcess[{.2, -.3, -.1}, 1, {.6, .2}, {4, {.3}, 1, {}}, 1]; aproc = ARProcess[proc, 15]

Compare sample paths:

Wolfram Language code: SeedRandom[13];sample = RandomFunction[proc, {150}]; SeedRandom[13];asample = RandomFunction[aproc, {150}]; ListLinePlot[{sample, asample}, PlotLegends -> {"SARIMA", "AR"}]

TransferFunctionModel representation:

Wolfram Language code: TransferFunctionModel[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2], z]

For a vector-valued process:

Wolfram Language code: α = {{.2, .3}, {0, .1}}; β = {{-.3, .1}, {.5, -.4}}; Σ = {{1, 0}, {0, 1}}; TransferFunctionModel[ARProcess[{α, β}, Σ], z]

PoleZeroPlot of a stationary AR process:

Wolfram Language code: proc = ARProcess[{.3, .4, .1}, 1]; tfm = TransferFunctionModel[proc];
Wolfram Language code: PoleZeroPlot[tfm]

A non stationary AR process has at least one pole outside the unit circle:

Wolfram Language code: proc = ARProcess[{.3, .5, .8}, 1, {}]; PoleZeroPlot[StateSpaceModel[proc]]

StateSpaceModel representation:

Wolfram Language code: StateSpaceModel[ARProcess[{Subscript[a, 1], Subscript[a, 2]}, σ^2]]

For a vector-valued process:

Wolfram Language code: α = {{.2, .3}, {0, .1}}; β = {{-.3, .1}, {.5, -.4}}; Σ = {{1, 0}, {0, 1}}; StateSpaceModel[ARProcess[{α, β}, Σ]]

Applications  (6)

Use ARProcess to estimate an ARMAProcess :

Wolfram Language code: data = RandomFunction[proc = ARMAProcess[{.3}, {.2}, 1], {10 ^ 4}]; ar = EstimatedProcess[data, ARProcess[20]]

Transform the estimated process to ARMA with given orders:

Wolfram Language code: arma = ARMAProcess[ar, {1, 1}]

Compare log-likelihood values:

Wolfram Language code: LogLikelihood[#, data]& /@ {proc, arma}

Consider the mean daily temperature for Champaign in August 2012:

Wolfram Language code: temp = TemporalData[TimeSeries, {{{20.5, 20.89, 22.5, 27.44, 26.5, 20.33, 18.83, 23.06, 20.83, 19.72, 14.89, 15.28, 18.11, 18.72, 17.5, 20.83, 17.94, 13.56, 16.44, 14.33, 14.72, 15.83, 17.28, 19.89, 20.44, 21.39, 24.89, 22.78, 22.83, 20.22, 24.4 ... te", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, ValueDimensions -> 1, MetaInformation -> {"Source" -> HoldForm[WeatherData["Champaign", "MeanTemperature", {{2012, 8}, {2012, 8}, "Day"}]]}}}, True, 10.1];
Wolfram Language code: temp["Source"]
Wolfram Language code: DateListPlot[temp, Joined -> True, Filling -> Axis]

Find process parameters:

Wolfram Language code: eproc = EstimatedProcess[temp, ARProcess[20]]

Compare CorrelationFunction of the model and the data:

Wolfram Language code: ListPlot[TemporalData[CorrelationFunction[#, {30}]& /@ {temp, eproc}], Filling -> {1 -> {2}}, PlotStyle -> PointSize[Medium], PlotLegends -> {"Data", "Model"}]

The hourly readings of temperature in June 2011 near your location:

Wolfram Language code: temp = TemporalData[TimeSeries, {{{20, 18.3, 17.2, 16.1, 15.6, 18.3, 21.1, 23.3, 25.6, 27.2, 28.3, 28.9, 30, 30, 30, 30.6, 30, 28.3, 25.6, 22.8, 22.2, 20.6, 19.4, 17.8, 17.8, 16.1, 17.8, 17.8, 18.9, 18.3, 19.4, 20, 18.3, 18, 18.3, 19, 20.6, 22.8 ... "Hour"}]}, 1, {"Discrete", 1}, {"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, MetaInformation -> {"Source" -> HoldForm[WeatherData[FindGeoLocation[], "Temperature", {2011, 6}]]}}}, True, 10.1];
Wolfram Language code: temp["Source"]
Wolfram Language code: DateListPlot[temp, Joined -> True, Filling -> Axis]

Find model parameters:

Wolfram Language code: proc = EstimatedProcess[temp, ARProcess[48]]

Create TimeSeriesModel with estimated process:

Wolfram Language code: tsm = TimeSeriesModelFit[temp, proc]

Check goodness of fit by investigating residuals:

Wolfram Language code: {#["ACFPlot"], #["PACFPlot"]}&[tsm]

The daily exchange rates of the euro to the dollar from May 2012 through September 2012:

Wolfram Language code: data = TemporalData[Automatic, {{{1.31, 1.31, 1.31, 1.3, 1.3, 1.3, 1.29, 1.29, 1.29, 1.27, 1.28, 1.28, 1.27, 1.26, 1.26, 1.26, 1.25, 1.24, 1.24, 1.23, 1.24, 1.24, 1.25, 1.26, 1.25, 1.26, 1.25, 1.25, 1.26, 1.26, 1.26, 1.26, 1.27, 1.27, 1.25, 1.25 ... Data`DateSpecification[{2012, 5, 2}, {2012, 9, 28}, "BusinessDay", "DayRange"]}, 1, {"Discrete", 1}, {"Discrete", 1}, 1, {MetaInformation -> {"Source" -> HoldForm[FinancialData]["EUR/USD", {{2012, 5, 1}, {2012, 9, 30}}]}}}, True, 9.];
Wolfram Language code: data["Source"]
Wolfram Language code: DateListPlot[data, Joined -> True, Filling -> Bottom]

The scatter plot of consecutive values indicates strong serial correlation:

Wolfram Language code: With[{vals = data["Values"]}, ListPlot[Transpose[{Most[vals], Rest[vals]}]]]

Fit an AR process to the exchange rates:

Wolfram Language code: eproc = EstimatedProcess[data, ARProcess[3]]

Forecast for 20 business days ahead:

Wolfram Language code: forecast = TimeSeriesForecast[eproc, data, {20}]

Plot the forecast with original data:

Wolfram Language code: DateListPlot[{data, forecast}, Joined -> True, Filling -> Bottom]

Daily mean temperature readings in years 20002011 near your location:

Wolfram Language code: temp = TemporalData[TimeSeries, {{{-1.22, -4.2, 2.14, 9.92, 18.05, 20.6, 25.11, 23.63, 18.85, 10.11, 4.42, -0.59, -4.52, -0.63, 4.72, 13.81, 14.6, 22.48, 23.41, 23.75, 19.75, 12.52, 7.45, -2.27, -7.41, -3.33, 4.81, 9.41, 22.12, 21.34, 25.7, 23.2 ... , 1}, {"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, MetaInformation -> {"Source" -> HoldForm[WeatherData[FindGeoLocation[], "MeanTemperature", {{1980, 1}, {2012, 1}, "Month"}]]}}}, True, 10.1];
Wolfram Language code: temp["Source"]
Wolfram Language code: DateListPlot[temp, Joined -> True, Filling -> Bottom]

Find process parameters:

Wolfram Language code: tsm = TimeSeriesModelFit[temp, "AR"]
Wolfram Language code: eproc = tsm["Process"]

Check stationarity assuming Automatic initial conditions:

Wolfram Language code: WeakStationarity[eproc]

Compare CorrelationFunction and PartialCorrelationFunction of the model and the sample:

Wolfram Language code: modelCorr = DiscretePlot[#[eproc, h], {h, 1, 60}, PlotRange -> {-1, 1}, ExtentSize -> 1 / 2]& /@ {CorrelationFunction, PartialCorrelationFunction}; sampleCorr = ListLinePlot[#[temp["PathStates"], {1, 60}], PlotRange -> {-1, 1}, PlotLabel -> #]& /@ {CorrelationFunction, PartialCorrelationFunction}; MapThread[Show[#2, #1]&, {modelCorr, sampleCorr}]

The following data represents the return on DJIA and return on market capitalization for eight months during 1961. Fit a VAR model to this data:

Wolfram Language code: data = TemporalData[{{1, {0.02619, 0.032994}}, {2, {0.02575, 0.033013}}, {3, {0.01442, 0.006127}}, {4, {0.02067, 0.022185}}, {5, {-0.02172, -0.030350}}, {6, {0.01913, 0.033709}}, {7, {0.03243, 0.022871}}, {8, {-0.03279, -0.020618}}}]
Wolfram Language code: ListLinePlot[data]
Wolfram Language code: eproc = EstimatedProcess[data, ARProcess[1]]

Simulate the estimated process:

Wolfram Language code: sample = RandomFunction[eproc, {1, 8}, 10 ^ 3];

Find the mean path for each component:

Wolfram Language code: mean = TimeSeriesThread[Mean, sample];
Wolfram Language code: ListLinePlot[mean]

Properties & Relations  (7)

ARProcess is a special case of an ARMAProcess :

Wolfram Language code: TransferFunctionModel[ARMAProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, {}, σ^2], z]
Wolfram Language code: TransferFunctionModel[ARProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, σ^2], z]
Wolfram Language code: % - %%

ARProcess is a special case of an ARIMAProcess :

Wolfram Language code: TransferFunctionModel[ARIMAProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, 0, {}, σ^2], z]
Wolfram Language code: TransferFunctionModel[ARProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, σ^2], z]
Wolfram Language code: % - %%

ARProcess is a special case of a FARIMAProcess :

Wolfram Language code: TransferFunctionModel[FARIMAProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, 0, {}, σ^2], z]
Wolfram Language code: TransferFunctionModel[ARProcess[{Subscript[a, 1], Subscript[a, 2], Subscript[a, 3]}, σ^2], z]
Wolfram Language code: % - %%

ARProcess is a special case of a SARMAProcess :

Wolfram Language code: TransferFunctionModel[SARMAProcess[{a}, {}, {1, {g}, {}}, σ^2], z]
Wolfram Language code: TransferFunctionModel[ARProcess[{a + g, -a g}, σ^2], z]
Wolfram Language code: Simplify[% - %%]

ARProcess is a special case of a SARIMAProcess :

Wolfram Language code: TransferFunctionModel[SARIMAProcess[{a}, 0, {}, {1, {g}, 0, {}}, σ^2], z]
Wolfram Language code: TransferFunctionModel[ARProcess[{a + g, -a g}, σ^2], z]
Wolfram Language code: Simplify[% - %%]

Squared values of an ARCHProcess follow an AR process:

Wolfram Language code: proc = ARCHProcess[1, {.2, .3}];
Wolfram Language code: data = RandomFunction[proc, {10 ^ 4}]["PathStates"];

CorrelationFunction and PartialCorrelationFunction of squared values:

Wolfram Language code: dataSQ = data ^ 2; ListPlot[#[dataSQ, {30}], Filling -> Axis, PlotRange -> {-.2, 1}, PlotLabel -> #]& /@ {CorrelationFunction, PartialCorrelationFunction}

The corresponding autoregressive process:

Wolfram Language code: ar = ARProcess[proc]

CorrelationFunction and PartialCorrelationFunction of the AR process:

Wolfram Language code: ListPlot[#[ar, {30}], Filling -> Axis, PlotRange -> {-.2, 1}, PlotLabel -> #]& /@ {CorrelationFunction, PartialCorrelationFunction}

Cumulated AR process is equivalent to an ARMAProcess :

Wolfram Language code: ar = ARProcess[{a}, v]; proc = TransformedProcess[x[t] + x[t - 1], xar, t];

Corresponding ARMA process:

Wolfram Language code: arma = ARMAProcess[{a}, {1}, v];

Compare means:

Wolfram Language code: Mean[proc[t]]
Wolfram Language code: Mean[arma[t]]

Compare covariance functions:

Wolfram Language code: Table[CovarianceFunction[proc, t, t + k] - CovarianceFunction[arma, t, t + k], {k, 0, 10}, {t, 1, 10}]//Simplify

Possible Issues  (5)

Some properties are defined only for wide-sense stationary processes:

Wolfram Language code: CovarianceFunction[ARProcess[{2, 3, .3}, 1], h]

Use FindInstance to find an example of a weakly stationary AR process:

Wolfram Language code: FindInstance[a > 1 && WeakStationarity[ARProcess[{a, b, 1 / 3}, 1]], {a, b}]
Wolfram Language code: CovarianceFunction[ARProcess[{3 / 2, -5 / 4, 1 / 3}, 1], h]//DiscretePlot[#, {h, 0, 10}]&

A process without specified initial values must satisfy weak stationarity conditions:

Wolfram Language code: ProcessParameterAssumptions[ARProcess[{a}, v]]

Some properties will work after specifying initial value(s):

Wolfram Language code: RandomFunction[ARProcess[{1}, 1], {3}]

Add zero initial values:

Wolfram Language code: RandomFunction[ARProcess[{1}, 1, {}], {3}]

LevinsonDurbin estimation method is not always applicable:

Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.4, b, b}, v], ProcessEstimator -> {"MethodOfMoments", Method -> "LevinsonDurbin"}]

Use a different solver:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.4, b, b}, v], ProcessEstimator -> {"MethodOfMoments", Method -> "NSolve"}]

The method of moments may not find a solution in estimation:

Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: EstimatedProcess[data, ARProcess[c, {a * b, a, b}, v], ProcessEstimator -> {"MethodOfMoments", Method -> "NSolve"}]

Use a different solver:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {a * b, a, b}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]

Maximum entropy estimation method does not allow fixed or repeated parameters:

Wolfram Language code: SeedRandom[4]; data = RandomFunction[ARProcess[2, {.4, .2}, 1], {100}];
Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.1, b, b}, v], ProcessEstimator -> "MaximumEntropy"]

Use a different solver:

Wolfram Language code: EstimatedProcess[data, ARProcess[c, {.1, b, b}, v], ProcessEstimator -> Automatic]

Neat Examples  (2)

Simulate a weakly stationary three-dimensional ARProcess :

Wolfram Language code: A = {{.2, .1, .1}, {0, -.2, .3}, {.2, -.1, .3}}; S = {{.8, .1, -.2}, {.1, .5, .1}, {-.2, .1, .3}}; proc1 = ARProcess[{A}, S]; data1 = RandomFunction[proc1, {100}]["PathStates"];
Wolfram Language code: Graphics3D[{ColorData["SolarColors"][RandomReal[]], Tube@Line@data1}]

Non-weakly stationary process, starting at the origin:

Wolfram Language code: B = {{.9, .2, .8}, {-.2, .8, -.3}, {.2, .2, .4}}; S = {{.8, .1, -.2}, {.1, .5, .1}, {-.2, .1, .3}}; proc2 = ARProcess[{B}, S, {}]; data2 = RandomFunction[proc2, {100}]["PathStates"];
Wolfram Language code: Graphics3D[{ColorData["SolarColors"][RandomReal[]], Tube@Line@data2}]

Simulate paths from an AR process:

Wolfram Language code: SeedRandom[154]; data = RandomFunction[ARProcess[{.3}, 1], {50}, 200];

Take a slice at 50 and visualize its distribution:

Wolfram Language code: sd = data["SliceData", 50];
Wolfram Language code: cf = ColorData["Rainbow"]; sliced = BarChart[Last[#], Axes -> False, BarOrigin -> Left, AspectRatio -> 4, ChartStyle -> (cf /@ Rescale[MovingAverage[First[#], 2], {Min[sd], Max[sd]}, {0, 1}]), ImageSize -> 55]&[HistogramList[sd, {Range[Min[sd], Max[sd], (Max[sd] - Min[sd]) / 20]}]];

Plot paths and histogram distribution of the slice distribution at 50:

Wolfram Language code: ListLinePlot[data, ImageSize -> 400, PlotRange -> All, AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {51, 0}, {0, 10}], PlotStyle -> (cf /@ Rescale[sd]), BaseStyle -> Directive[Thin, Opacity[0.5]], PlotRangePadding -> {{0, 15}, {.5, .5}}]
Wolfram Research (2012), ARProcess, Wolfram Language function, https://reference.wolfram.com/language/ref/ARProcess.html (updated 2014).

Text

Wolfram Research (2012), ARProcess, Wolfram Language function, https://reference.wolfram.com/language/ref/ARProcess.html (updated 2014).

CMS

Wolfram Language. 2012. "ARProcess." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/ARProcess.html.

APA

Wolfram Language. (2012). ARProcess. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ARProcess.html

BibTeX

@misc{reference.wolfram_2026_arprocess, author="Wolfram Research", title="{ARProcess}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ARProcess.html}", note=[Accessed: 13-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_arprocess, organization={Wolfram Research}, title={ARProcess}, year={2014}, url={https://reference.wolfram.com/language/ref/ARProcess.html}, note=[Accessed: 13-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /