arma_to_ar {deseats}R Documentation

AR Representation of an ARMA Model

Description

Calculate the coefficients of the infinite-order AR-representation of a given ARMA model.

Usage

arma_to_ar(ar = numeric(0), ma = numeric(0), max_i = 1000)

Arguments

ar

a numeric vector with the AR parameters of the ARMA model; should be ordered from a_1 to a_p (see Details).

ma

a numeric vector with the MA parameters of the ARMA model; should be ordered from b_1 to b_q (see Details).

max_i

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).

Details

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.

Value

A numeric vector is returned.

Author(s)

Examples

ar <- c(1.2, -0.4)
ma <- c(0.5)
arma_to_ar(ar = ar, ma = ma, max_i = 100)


[Package deseats version 1.1.0 Index]