SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},v]
represents a weakly stationary seasonal autoregressive moving-average process with ARMA coefficients ai and bj, seasonal order s, seasonal ARMA coefficients αi and βj, and normal white noise with variance v.
SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},Σ]
represents a weakly stationary vector SARMA process driven by normal white noise, with covariance matrix Σ.
SARMAProcess[{a1,…,ap},{b1,…,bq},{{s1,…},{α1,…,αm},{β1,…,βr}},Σ]
represents a weakly stationary vector SARMA process with multiple seasonal orders si.
SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},v,init]
represents a SARMA process with initial data init.
SARMAProcess[c,…]
represents a SARMA process with a constant c.
SARMAProcess
SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},v]
represents a weakly stationary seasonal autoregressive moving-average process with ARMA coefficients ai and bj, seasonal order s, seasonal ARMA coefficients αi and βj, and normal white noise with variance v.
SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},Σ]
represents a weakly stationary vector SARMA process driven by normal white noise, with covariance matrix Σ.
SARMAProcess[{a1,…,ap},{b1,…,bq},{{s1,…},{α1,…,αm},{β1,…,βr}},Σ]
represents a weakly stationary vector SARMA process with multiple seasonal orders si.
SARMAProcess[{a1,…,ap},{b1,…,bq},{s,{α1,…,αm},{β1,…,βr}},v,init]
represents a SARMA process with initial data init.
SARMAProcess[c,…]
represents a SARMA process with a constant c.
Details
- SARMAProcess is a discrete-time and continuous-state random process.
- The SARMA process is described by the difference equation
, with
, where
is the state output,
is 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 SARMA process should have real coefficients ai, αi, bj, βj, and c, positive integer seasonality coefficients s, and a positive variance v.
- An
-dimensional vector SARMA process should have real coefficient matrices ai, αi, bj, and βj of dimensions
×
, real vector c of length
, integer positive seasonality constants si or integer positive seasonality constant s, and the covariance matrix Σ should be symmetric positive definite of dimensions
×
. - The SARMA process with zero constant has transfer function
, where
,
,
,
, and
is an n-dimensional unit. - SARMAProcess[p,q,{s,sp,sq}] represents a SARMA process with autoregressive and moving-average orders p and q, their seasonal counterparts sp and sq, and seasonality s for use in EstimatedProcess and related functions.
- SARMAProcess can be used with such functions as CovarianceFunction, RandomFunction, and TimeSeriesForecast.
Examples
open all close allBasic Examples (3)
SeedRandom[13];sample = RandomFunction[SARMAProcess[1, {.5}, {.2}, {12, {.8}, {-.2}}, 1], {1, 10 ^ 2}]ListPlot[sample, Filling -> Axis]CovarianceFunction[SARMAProcess[{}, {a}, {3, {}, {b}}, σ^2], s, t]DiscretePlot3D[CovarianceFunction[SARMAProcess[{}, {}, {6, {.6}, {4}}, 1.], s, t], {s, 0, 25}, {t, 0, 25}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]DiscretePlot[CorrelationFunction[SARMAProcess[{.4}, {1}, {12, {.8}, {.4}}, 1], h], {h, 0, 60}, ExtentSize -> 1 / 2]DiscretePlot[PartialCorrelationFunction[SARMAProcess[{.4}, {1}, {12, {.8}, {.4}}, 1], h], {h, 1, 40}, ExtentSize -> 1 / 2]Scope (33)
Basic Uses (9)
Simulate an ensemble of paths:
data = RandomFunction[SARMAProcess[1, {.5}, {}, {12, {.6}, {.1}}, 1], {50}, 4]ListLinePlot[data, Filling -> Axis]Simulate with given precision:
RandomFunction[SARMAProcess[1, {2 / 10, 1 / 10}, {2 / 7}, {12, {2 / 10}, {2}}, 1 / 10, {1 / 3}], {1, 4}, WorkingPrecision -> 20]["Path"]Simulate a scalar process with different seasonalities:
sample[s_] := (SeedRandom[3];RandomFunction[SARMAProcess[{.8}, {}, {s, {.9}, {2}}, .1], {1, 2 10 ^ 2}]);Sample paths for positive and negative values of the parameter:
ListPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["seasonality = ", ToString[#]]]& /@ {4, 12}Simulate a weakly stationary process with given initial values:
sproc[x_] := SARMAProcess[.1, {.6}, {.3}, {4, {.6}, {-.2}}, 1, {x}];pts = {-4, 0, 4, 8};samples = Table[SeedRandom[4];RandomFunction[sproc[x], {50}], {x, pts}];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:
tproc[x_] := SARMAProcess[.1, {.9}, {.3}, {4, {1.1}, {-.2}}, 1, {x}];tsamples = Table[SeedRandom[4];RandomFunction[tproc[x], {30}], {x, pts}];ListLinePlot[tsamples, DataRange -> {0, 12}, PlotLegends -> (StringJoin["x = ", ToString[#]]& /@ pts)]Simulate a two-dimensional process:
α = {{.2, .1}, {-.3, .2}};
β = {{.2, .5}, {-.2, .9}};
Σ = {{1, 0}, {0, .3}};
sample = RandomFunction[SARMAProcess[{α}, {β}, {4, {α}, {β}}, Σ], {1, 10 ^ 2}];Create a 2D sample path function from the data:
s = TimeSeries[sample, ResamplingMethod -> Automatic];
f = s["PathFunction"];
g[t_ ? NumericQ] := f[t]The color of the path is the function of time:
ParametricPlot[g[t], {t, 1, 100}, ColorFunction -> Function[{x, y, t}, (ColorData["BlueGreenYellow"][t])], AspectRatio -> 1, AxesLabel -> {x, y}]Create a 3D sample path function with time:
gg[t_ ? NumericQ] := Join[{t}, f[t]]The color of the path is the function of time:
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:
α = {{.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[SARMAProcess[{}, {β}, {{6, 3, 4}, {α}, {}}, Σ], {1, 10 ^ 2}]Create a sample path function from the data:
s = TimeSeries[sample, ResamplingMethod -> Automatic];
f = s["PathFunction"];
g[t_ ? NumericQ] := f[t]The color of the path is the function of time:
ParametricPlot3D[g[t], {t, 1, 100}, ColorFunction -> Function[{x, y, z, t}, (ColorData["BlueGreenYellow"][t])], PlotStyle -> Thick, BoxRatios -> 1, AxesLabel -> {x, y, z}]sample = RandomFunction[SARMAProcess[.2, {}, {}, {4, {.8}, {.4}}, 1], {1, 10 ^ 3}];
eproc = EstimatedProcess[sample, SARMAProcess[c, {}, {}, {4, {a}, {b}}, v]]Compare the sample correlation functions with that of the estimated process:
Show[ListPlot[CorrelationFunction[sample, {15}], Filling -> 0, PlotStyle -> PointSize[Medium]], DiscretePlot[CorrelationFunction[eproc, h], {h, 0, 15}, ExtentSize -> 1 / 2]]Use TimeSeriesModel to automatically find orders:
TimeSeriesModelFit[sample, "SARMA"]bestfit = %["BestFit"]Compare the sample covariance functions with the best time series model:
Show[ListPlot[CorrelationFunction[sample, {15}], Filling -> 0, PlotStyle -> PointSize[Medium]], DiscretePlot[CorrelationFunction[bestfit, h], {h, 0, 15}, ExtentSize -> 1 / 2]]proc = SARMAProcess[.5, {.1, .4}, {-.3}, {4, {.6}, {2}}, .1];
sample = RandomFunction[proc, {1, 50}];Find the forecast for the next 20 steps:
forecast = TimeSeriesForecast[proc, sample, {20}]Show the path of the forecast:
forecast["Path"]Plot the data and the forecasted values:
ListLinePlot[{sample, forecast}, InterpolationOrder -> 0, Filling -> Axis]Find a forecast for a vector-valued time series process:
proc = SARMAProcess[{1, 2}, {{{.2, .1}, {.5, .3}}}, {{{.9, .3}, {-.3, .5}}}, {4, {{{-.7, .2}, {.3, .4}}}, {{{.8, .1}, {.3, -.2}}}}, {{1, .3}, {.3, .5}}];
data = RandomFunction[proc, {0, 30}];Find the forecast for the next 15 steps:
forecast = TimeSeriesForecast[proc, data, {15}]Plot the data and the forecast for each component:
Row@Table[ListLinePlot[#["PathComponent", j]& /@ {data, forecast}, PlotLabel -> Subscript[x, j], PlotLegends -> {"data", "forecast"}], {j, 1, 2}]Covariance and Spectrum (5)
Closed-form correlation function for low order:
CorrelationFunction[SARMAProcess[{}, {}, {4, {.1}, {.2}}, 1], h]//FullSimplifyCorrelation[SARMAProcess[{.2}, {.1}, {12, {.3}, {.1}}, 1][{1, 5}]]//MatrixFormCovariance[SARMAProcess[{-.4}, {2}, {4, {.9}, {.2}}, 1][{1, 5}]]//MatrixFormCovariance function for a vector-valued process:
Σ = {{Subscript[σ, 1]^2, ρ Subscript[σ, 1]Subscript[σ, 2]}, {ρ Subscript[σ, 1]Subscript[σ, 2], Subscript[σ, 2]^2}};
α = {{a, 0}, {0, b}};
β = {{c, 0}, {0, d}};CovarianceFunction[SARMAProcess[{α}, {}, {4, {β}, {}}, Σ], 0]//MatrixFormproc = SARMAProcess[{-.6, -.7}, {.4, .3}, {12, {.3, .2}, {.1, .8}}, 1];Plot[PowerSpectralDensity[proc, w], {w, -π, π}, Filling -> Axis]PowerSpectralDensity[SARMAProcess[{a}, {b}, {3, {g}, {h}}, σ^2], w]Vector SARMAProcess:
a = {{1 / 9, 0}, {1 / 3, 1 / 2}};
b = {{1 / 3, 1 / 4}, {1 / 2, 0}};
Σ = {{1, 0}, {0, 1}};
proc = SARMAProcess[{}, {}, {4, {b}, {a}}, Σ];psd = PowerSpectralDensity[proc, ω];
psd//FullSimplify//MatrixFormStationarity and Invertibility (4)
Check if a time series is weakly stationary:
WeakStationarity[SARMAProcess[2, {1, 2}, {3}, {12, {.4}, {.3}}, 1, {}]]WeakStationarity[SARMAProcess[{{{.3, .2}, {-.4, .1}}}, {{{-.5, .2}, {0, .4}}}, {12, {{{.4, .2}, {-.6, .2}}}, {{{.3, .6}, {.9, .8}}}}, {{1, .4}, {.4, .8}}]]Find conditions for a process to be weakly stationary:
WeakStationarity[SARMAProcess[c, {Subscript[a, 1], Subscript[a, 2]}, {Subscript[b, 1]}, {s, {Subscript[g, 1], Subscript[g, 2]}, {Subscript[h, 1]}}, σ^2]]Stationarity conditions depend only on the autoregressive coefficients:
WeakStationarity[SARMAProcess[{}, {b}, {s, {}, {g}}, σ^2]]Check if a time series is invertible:
proc = SARMAProcess[.1, {1 / 3}, {1, 2}, {12, {.3}, {.1}}, 1];TimeSeriesInvertibility[proc]Find its invertible representation:
ToInvertibleTimeSeries[proc]TimeSeriesInvertibility[SARMAProcess[{{{.3, .2}, {-.4, .1}}}, {{{-.5, .2}, {0, .4}}}, {12, {{{.4, .2}, {-.6, .2}}}, {{{.3, .6}, {.9, .8}}}}, {{1, .4}, {.4, .8}}]]Find invertibility conditions:
TimeSeriesInvertibility[SARMAProcess[c, {Subscript[a, 1]}, {Subscript[b, 1], Subscript[b, 2]}, {s, {Subscript[g, 1]}, {Subscript[h, 1]}}, σ^2]]Estimation Methods (5)
The available methods for estimating a SARMAProcess:
methods = {Automatic, "MethodOfMoments", "MaximumConditionalLikelihood", "MaximumLikelihood", "SpectralEstimator"};SeedRandom[121];
data = RandomFunction[SARMAProcess[{.4}, {.3}, {3, {.2}, {}}, 1], {200}];Grid[res = Table[{m, Quiet@EstimatedProcess[data, SARMAProcess[1, 1, {3, 1, 0}], ProcessEstimator -> m]}, {m, methods}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]Method of moments admits the following solvers:
solvers = {Automatic, "FindRoot"};SeedRandom[13241];
data = RandomFunction[SARMAProcess[.2, {.1}, {.1}, {4, {.2}, {}}, 1], {300}];Grid[Table[{m, Quiet@EstimatedProcess[data, SARMAProcess[1, 1, {4, 1, 0}], ProcessEstimator -> {"MethodOfMoments", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]This method allows for fixed parameters:
EstimatedProcess[data, SARMAProcess[c, {.4, b}, {m}, {3, {.2}, {w}}, v], ProcessEstimator -> "MethodOfMoments"]Some relations between parameters are also permitted:
EstimatedProcess[data, SARMAProcess[c, {a * b, b}, {a}, {3, {b}, {w}}, v], ProcessEstimator -> "MethodOfMoments"]Maximum conditional likelihood method allows the following solvers:
solvers = {Automatic, "FindMaximum", "NMaximize"};SeedRandom[14];
data = RandomFunction[SARMAProcess[2, {.4}, {.3}, {3, {.2}, {.1}}, 1], {100}];Grid[Table[{m, EstimatedProcess[data, SARMAProcess[1, 1, {3, 1, 1}], ProcessEstimator -> {"MaximumConditionalLikelihood", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]This method allows for fixed parameters:
EstimatedProcess[data, SARMAProcess[c, {.1}, {m}, {3, {.2}, {r}}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]Some relations between parameters are also permitted:
EstimatedProcess[data, SARMAProcess[c, {b, b}, {m}, {3, {b}, {w}}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]Maximum likelihood method allows the following solvers:
solvers = {Automatic, "FindMaximum", "NMaximize"};SeedRandom[14];
data = RandomFunction[SARMAProcess[2, {.4}, {.3}, {3, {.2}, {}}, 1], {100}];Grid[Table[{m, Quiet@EstimatedProcess[data, SARMAProcess[1, 1, {3, 1, 0}], ProcessEstimator -> {"MaximumLikelihood", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]This method allows for fixed parameters:
EstimatedProcess[data, SARMAProcess[c, {b}, {.3}, {3, {.2}, {w}}, v], ProcessEstimator -> "MaximumLikelihood"]Some relations between parameters are also permitted:
EstimatedProcess[data, SARMAProcess[c, {b, b}, {m}, {3, {b}, {w}}, v], ProcessEstimator -> "MaximumLikelihood"]Spectral estimator allows you to specify windows used for PowerSpectralDensity calculation:
SeedRandom[14];
data = RandomFunction[SARMAProcess[2, {.4}, {.3}, {3, {.2}, {.1}}, 1], {100}];Grid[Table[{m, EstimatedProcess[data, SARMAProcess[1, 1, {3, 1, 1}], ProcessEstimator -> {"SpectralEstimator", "Window" -> m}]}, {m, {10, BartlettWindow, {3, HannWindow}}}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]Spectral estimator allows following solvers:
solvers = {Automatic, "FindMinimum", "NMinimize"};Grid[Table[{m, EstimatedProcess[data, SARMAProcess[1, 1, {3, 1, 1}], ProcessEstimator -> {"SpectralEstimator", Method -> m}]}, {m, solvers}], Frame -> All, Spacings -> {1, 2}, Alignment -> {Left, Center}]This method allows for fixed parameters:
EstimatedProcess[data, SARMAProcess[c, {.1, b}, {m}, {3, {.2}, {w}}, v], ProcessEstimator -> "SpectralEstimator"]Some relations between parameters are also permitted:
EstimatedProcess[data, SARMAProcess[c, {b, b}, {m}, {3, {b}, {w}}, v], ProcessEstimator -> "SpectralEstimator"]Process Slice Properties (5)
Single time SliceDistribution:
Mean@SARMAProcess[1, {.2}, {.3}, {4, {}, {.1}}, 1][2]Multiple time slice distributions:
Mean@SARMAProcess[1, {.2}, {.3}, {4, {}, {.1}}, 1, {}][{1, 3}]Slice distribution of a vector-valued time series:
α = {{.1, .2}, {0., -.3}};
β = {{.3, 0.}, {.9, -.2}};
γ = {{.2, .1}, {0., -.1}};
δ = {{0., .1}, {-.1, .2}};
Σ = {{1, 0}, {0, 1}};
Mean@SARMAProcess[{α}, {β}, {3, {γ}, {δ}}, Σ][t]First-order stationary probability density function:
pdf := PDF[SARMAProcess[1, {.4}, {.3}, {4, {.6}, {.1}}, 1, {}][t], x]times = Table[i, {i, 1, 13, 3}];Plot[Evaluate@Table[pdf, {t, times}], {x, -3, 9}, Filling -> Axis, PlotLegends -> (StringJoin["t = ", ToString@#]& /@ times)]μ = Mean[SARMAProcess[1, {.4}, {.3}, {4, {.6}, {.1}}, 1][∞]]v = Variance[SARMAProcess[{.4}, {.3}, {4, {.6}, {.1}}, 1][∞]]Compare with the density function of a normal distribution:
PDF[NormalDistribution[μ, Sqrt[v]], x]FullSimplify[% - PDF[SARMAProcess[1, {.4}, {.3}, {4, {.6}, {.1}}, 1][∞], x]]Compute the expectation of an expression:
Expectation[x[4] ^ 2, xSARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1]]Probability[x[7] < 6, xSARMAProcess[1, {.2}, {.3}, {4, {}, {.1}}, 1]]Skewness[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][∞]]Kurtosis[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][∞]]Table[Moment[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], r], {r, 0, 4}]CharacteristicFunction[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], w]MomentGeneratingFunction[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], w]CentralMoment and its generating function:
Table[CentralMoment[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], r], {r, 0, 4}]CentralMomentGeneratingFunction[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], w]FactorialMoment has no closed form for symbolic order:
Table[FactorialMoment[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], r], {r, 0, 4}]FactorialMomentGeneratingFunction[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], w]Cumulant and its generating function:
Table[Cumulant[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], r], {r, 0, 4}]CumulantGeneratingFunction[SARMAProcess[{.2}, {.3}, {4, {}, {.1}}, 1][t], w]Representations (5)
Approximate with an ARProcess:
proc = SARMAProcess[1, {.2, -.3, -.1}, {.6, .2}, {12, {.3}, {}}, 1];
aproc = ARProcess[proc, 10]Compare the covariance function for the original and the approximate processes:
DiscretePlot[CovarianceFunction[#, h], {h, 0, 20}, ExtentSize -> 1 / 2, PlotRange -> All, PlotLabel -> Head[#]]& /@ {proc, aproc}proc = SARMAProcess[{1, 2}, {{{.2, .1}, {.5, .3}}}, {{{.9, .3}, {-.3, .5}}}, {4, {{{-.7, .2}, {.3, .4}}}, {{{.8, .1}, {.3, -.2}}}}, {{1, .3}, {.3, .5}}];ARProcess[proc, 3]Approximate with an MAProcess:
proc = SARMAProcess[1, {.2, -.3, -.1}, {.6, .2}, {12, {.3}, {}}, 1, {}];
aproc = MAProcess[proc, 12]SeedRandom[13];sample = RandomFunction[proc, {100}];
SeedRandom[13];asample = RandomFunction[aproc, {100}];
ListLinePlot[{sample, asample}, PlotLegends -> {"SARMA", "MA"}]proc = SARMAProcess[{1, 2}, {{{.2, .1}, {.5, .3}}}, {{{.9, .3}, {-.3, .5}}}, {4, {{{-.7, .2}, {.3, .4}}}, {{{.8, .1}, {.3, -.2}}}}, {{1, .3}, {.3, .5}}];MAProcess[proc, 3]Represent as equivalent ARMAProcess:
proc = SARMAProcess[1, {2 / 10, -3 / 10}, {6 / 10, 2 / 10}, {12, {3 / 10}, {}}, 1];
aproc = ARMAProcess[proc]DiscretePlot[CovarianceFunction[#, h], {h, 0, 20}, ExtentSize -> 1 / 2, PlotRange -> All, PlotLabel -> Head[#]]& /@ {proc, aproc}TransferFunctionModel representation:
TransferFunctionModel[SARMAProcess[{a}, {b}, {12, {g}, {h}}, σ^2], z]A = {{.2, .3}, {0, .1}};
B = {{-.3, 0}, {.5, -.4}};
Σ = {{1, 0}, {0, 1}};
TransferFunctionModel[SARMAProcess[{}, {A}, {4, {B}, {}}, Σ], z]StateSpaceModel representation:
StateSpaceModel[SARMAProcess[{a}, {b}, {4, {g}, {h}}, σ^2]]A = {{.2, .3}, {0, .1}};
B = {{-.3, .1}, {.5, -.4}};
Σ = {{1, 0}, {0, 1}};
StateSpaceModel[SARMAProcess[{}, {A}, {3, {B}, {}}, Σ]]Applications (3)
Use a SARMA process to model daily, monthly, and half-yearly autocorrelations:
proc = SARMAProcess[{.1}, {}, {30, {.3, 0, 0, 0, 0, .5}, {}}, 1];The covariance function shows the serial correlations:
cov = CovarianceFunction[proc, k];DiscretePlot[cov, {k, 1, 3 * 365}, PlotRange -> All]Daily mean temperature readings on the first of each month from the years 2000–2011 near your location:
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];temp["Source"]DateListPlot[temp, Joined -> True, Filling -> Bottom]tsm = TimeSeriesModelFit[temp]The estimated time series process:
eproc = tsm["Process"]Forecast future values for the next three years:
forecast = TimeSeriesForecast[eproc, temp, {3 * 12}];DateListPlot[{temp, forecast}, Joined -> True, Filling -> Bottom]Fit a SARMA model for the hourly measurements of temperature in August:
temp = TemporalData[TimeSeries, {{{21.1, 20.6, 20, 19.4, 18.9, 20.6, 22.8, 25, 27.2, 28.9, 30, 30.6, 31.7,
32.2, 32.2, 32.8, 32.2, 30.6, 26.7, 23.9, 21.7, 21.7, 19.4, 18.3, 18.3, 17.2, 16.7, 16.1, 15.6,
17.2, 22.8, 26.1, 28.9, 31.7, 32.8, 33.9, ... 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1},
MetaInformation -> {"Source" -> Defer[WeatherData["Champaign", "Temperature", {2012, 8}]],
"Unit" -> "DegreesCelsius"}, TemporalRegularity -> True}}, True, 10.1];temp["Source"]DateListPlot[temp, Filling -> Axis]eproc = EstimatedProcess[temp, SARMAProcess[Mean[temp], {a1, a2}, {b}, {12, {c1, c2}, {d1}}, v], ProcessEstimator -> "MaximumConditionalLikelihood"]Check if the process is weakly stationary:
WeakStationarity[eproc]The SARMA model does capture the seasonal trend well:
ListPlot[CorrelationFunction[#, {100}]& /@ {temp, eproc}, PlotStyle -> PointSize[Medium], PlotLegends -> {"Data", "Model"}, DataRange -> {0, 100}]Properties & Relations (3)
SARMAProcess is a generalization of an ARMAProcess:
TransferFunctionModel[SARMAProcess[{a}, {b}, {1, {g}, {h}}, σ^2], z]TransferFunctionModel[ARMAProcess[{a + g, -a g}, { b + h, h b}, σ^2], z]Simplify[% - %%]SARMAProcess is a generalization of an ARProcess:
TransferFunctionModel[SARMAProcess[{a}, {}, {1, {g}, {}}, σ^2], z]TransferFunctionModel[ARProcess[{a + g, -a g}, σ^2], z]Simplify[% - %%]SARMAProcess is a generalization of an MAProcess:
TransferFunctionModel[SARMAProcess[{}, {b}, {1, {}, {h}}, σ^2], z]TransferFunctionModel[MAProcess[{b + h, b h}, σ^2], z]Simplify[% - %%]Possible Issues (2)
Some properties are defined only for weakly stationary processes:
CovarianceFunction[SARMAProcess[{2}, {.2}, {3, {.1}, {.3}}, 1], h]Use FindInstance to find a weakly stationary process:
FindInstance[a > 0 && WeakStationarity[SARMAProcess[{a}, {.2}, {3, {.1}, {.3}}, 1]], a]CovarianceFunction[SARMAProcess[{1 / 2}, {.2}, {3, {.1}, {.3}}, 1], h]ToInvertibleTimeSeries does not always exist:
ToInvertibleTimeSeries[SARMAProcess[{.2}, {.3, 1}, {4, {.2}, {.3, 1}}, .2]]There are zeros of TransferFunctionModel lying on the unit circle:
TransferFunctionZeros[TransferFunctionModel[SARMAProcess[{.2}, {.3, 1}, {4, {.2}, {.3, 1}}, .2]]]Abs[%]Neat Examples (2)
Simulate a weakly stationary three-dimensional SARMAProcess:
A = {{.2, .1, .1}, {0, -.2, .3}, {.2, -.1, .3}};
B = {{.4, .2, 0}, {-.2, .8, -.3}, {0, .2, 0}};
S = {{.8, .1, -.2}, {.1, .5, .1}, {-.2, .1, .3}};
proc1 = SARMAProcess[{}, {}, {12, {A}, {B}}, S];
data1 = RandomFunction[proc1, {100}]["PathStates"];Graphics3D[{ColorData["SolarColors"][RandomReal[]], Tube@Line@data1}]Non-weakly stationary process, starting at the origin:
a = {{.9, .2, .8}, {-.2, .8, -.3}, {.2, .2, .4}};
proc2 = SARMAProcess[{a}, {B}, {12, {a}, {A}}, S, {{0, 0, 0}}];
data2 = RandomFunction[proc2, {100}]["PathStates"];Graphics3D[{ColorData["SolarColors"][RandomReal[]], Tube@Line@data2}]Simulate paths from a SARMA process:
SeedRandom[154];data = RandomFunction[SARMAProcess[{.3}, {.6}, {6, {.8}, {.2}}, 1], {50}, 300];Take a slice at 50 and visualize its distribution:
sd = data["SliceData", 50];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 -> 60]&[HistogramList[sd, {Range[Min[sd], Max[sd], (Max[sd] - Min[sd]) / 20]}]];Plot paths and histogram distribution of the slice distribution at 50:
ListLinePlot[data, ImageSize -> 400, PlotRange -> All,
AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {51, 0}, {0, 11}], PlotStyle -> (cf /@ Rescale[sd]), BaseStyle -> Directive[Thin], PlotRangePadding -> {{0, 15}, {.5, .5}}]Related Guides
Text
Wolfram Research (2012), SARMAProcess, Wolfram Language function, https://reference.wolfram.com/language/ref/SARMAProcess.html (updated 2014).
CMS
Wolfram Language. 2012. "SARMAProcess." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/SARMAProcess.html.
APA
Wolfram Language. (2012). SARMAProcess. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SARMAProcess.html
BibTeX
@misc{reference.wolfram_2026_sarmaprocess, author="Wolfram Research", title="{SARMAProcess}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SARMAProcess.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sarmaprocess, organization={Wolfram Research}, title={SARMAProcess}, year={2014}, url={https://reference.wolfram.com/language/ref/SARMAProcess.html}, note=[Accessed: 12-June-2026]}