sample_ARMA_coef {arima2} | R Documentation |
Sample ARMA coef
Description
This function randomly samples the ARMA coefficients of a specified ARMA model. The coefficients are sampled so that the resulting ARMA model is both causal and invertible.
Usage
sample_ARMA_coef(
order = c(0L, 0L),
seasonal = list(order = c(0L, 0L), period = NA),
n = 1,
Mod_bounds = c(0, 1),
min_inv_root_dist = 0,
method = c("UnifRoots", "DL")
)
Arguments
order |
A specification of the non-seasonal part of the ARIMA model:
this is different than the |
seasonal |
A specification of the seasonal part of the ARIMA model. Can
be either a vector of length 2, or a list with an |
n |
An integer indicating how many sets of ARMA coefficients should be sampled. |
Mod_bounds |
Bounds on the magnitude of the roots. |
min_inv_root_dist |
This parameter is included so as to help avoid ARMA
models that contain parameter redundancy, if desired. Specifically,
this parameter ensures that the minimum distance between any of the
inverted roots in the AR and MA polynomials is greater than
|
method |
Method used to randomly sample parameter initializations.
|
Details
For an ARMA model to be causal and invertible, the roots of the AR and MA polynomials must lie outside the the complex unit circle. The AR and MA polynomials are defined as:
\phi(z) = 1 - \phi_1 z - \phi_2 z^2 - \ldots - \phi_p z^p
\theta(z) = 1 + \theta_1 z + \theta_2 z^2 + \ldots + \theta_q z^q
where z
is a complex number, \phi_1, \ldots, \phi_p
are the
p
AR coefficients of the ARMA model, and
\theta_1, \ldots, \theta_p
are the q
MA coefficients of the ARMA
model.
This function implements two distinct sampling schemes.
init_method = "DL"
will sample parameters using the Durbin-Levinson
algorithm, described by Monahan (1984). If init_method = "UnifRoots"
,
then inverted roots of AR and MA polynomials will be sampled uniformly from
the complex unit circle. In the later method, to ensure that the resulting
polynomial coefficients are real, we only sample half of the needed number
of complex roots, and set the remaining half to be the complex conjugate of
the sampled points. In the case where the number of coefficients is odd, the
remaining root is sampled uniformly, satisfying the Mod_bounds
parameter.
Value
a vector of randomly sampled ARMA coefficients.
References
Monahan, John F. (1984) A note on enforcing stationarity in autoregressive-moving average models. Biometrika, 71(2), 403–404.
Examples
{
sample_ARMA_coef(
order = c(2, 1),
seasonal = list(order = c(1, 0), period = 2),
n = 100
)
}