X = arma(E,Ar,Ma)
X = arma(E,Ar,Ma,Range)
E
[ tseries ] - Input time series that will be run through an ARMA model.
Ar
[ numeric | empty ] - Row vector of AR coefficients; if empty, Ar = 1
; see Description.
Ma
[ numeric | empty ] - Row vector of MA coefficients; if empty, Ma = 1
; see Description.
Range
[ numeric | @auto
] - Range on which the input series will be constructed; if not specified or @auto
, the range will be determined based on the input time series, E
.
X
[ tseries ] - Output time series constructed by running an ARMA model through the input series.The output series is constructed as follows:
$$ A(L) X_t = M(L) E_t $$
where $A(L)$ and $M(L)$ are polynomials in lag operator defined by the vectors Ar
and Ma
. In other words,
X(t) = ( -Ar(2)*X(t-1) - Ar(3)*X(t-2) - ...
+ Ma(1)*E(t) + Ma(2)*E(t-1) + ... ) / Ar(1);
Construct an AR(1) process with autoregression coefficient 0.8, based on normally distributed innovations.
E = tseries(1:20,@randn);
X = arma(E,[1,-0.8],[]);