Generate an ARMA(\(p\),\(q\)) process with supplied vector of Autoregressive Coefficients (\(\phi\)), Moving Average Coefficients (\(\theta\)), and \(\sigma^2\).
gen_arma(N, ar, ma, sigma2 = 1.5, n_start = 0L)
An integer
for signal length.
A vec
that contains the AR coefficients.
A vec
that contains the MA coefficients.
A double
that contains process variance.
An unsigned int
that indicates the amount of observations to be used for the burn in period.
A vec
that contains the generated observations.
The Autoregressive order \(p\) and Moving Average order \(q\) (ARMA(\(p\),\(q\))) process with non-zero parameters \(\phi_i \in (-1,+1)\) for the AR components, \(\theta_j \in (-1,+1)\) for the MA components, and \(\sigma^2 \in {\rm I\!R}^{+}\). This process is defined as:
$${X_t} = \sum\limits_{i = 1}^p {{\phi _i}{X_{t - i}}} + \sum\limits_{i = 1}^q {{\theta _i}{\varepsilon _{t - i}}} + {\varepsilon _t}$$ where $${\varepsilon_t}\mathop \sim \limits^{iid} N\left( {0,\sigma^2} \right)$$
The innovations are generated from a normal distribution. The \(\sigma^2\) parameter is indeed a variance parameter. This differs from R's use of the standard deviation, \(\sigma\).
For AR(1)
, MA(1)
, and ARMA(1,1)
please use their functions if speed is important
as this function is designed to generate generic ARMA processes.