Calculate the coefficients of the infinite-order AR-representation of a given ARMA model.
arma_to_ar(ar = numeric(0), ma = numeric(0), max_i = 1000)
A numeric vector is returned.
a numeric vector with the AR parameters of the ARMA model; should be ordered from \(a_1\) to \(a_p\) (see Details).
a numeric vector with the MA parameters of the ARMA model; should be ordered from \(b_1\) to \(b_q\) (see Details).
a single numeric value that indicates how many coefficients
should be returned; returned will be max_i + 1
coefficients (the
coefficient for index 0 is also returned as the first value).
Dominik Schulz (Research Assistant) (Department of Economics, Paderborn
University),
Author and Package Creator
Consider an ARMA model
$$X_t = a_1 X_{t-1} + ... + a_p X_{t-p} + b_1 \epsilon_{t-1} + ... + b_q \epsilon_{t-q} + \epsilon_t,$$
where \(a_1, ..., a_p\) and \(b_1, ..., b_q\) are its real-valued
coefficients. The function arma_to_ar()
uses these coefficients as
input to calculate the coefficients of the truncated infinite-order
AR-representation of the model defined through these coefficients. Note that
the stationarity and invertibility of the model defined through the provided
coefficients is not being checked.
NOTE:
This function implements C++ code by means
of the Rcpp
and
RcppArmadillo
packages for
better performance.
ar <- c(1.2, -0.4)
ma <- c(0.5)
arma_to_ar(ar = ar, ma = ma, max_i = 100)
Run the code above in your browser using DataLab