ARMApolyroots {arima2}R Documentation

ARMA polyroots

Description

This function calculates the roots of the AR or MA polynomials that correspond to an ARMA model.

Usage

ARMApolyroots(model, type = c("AR", "MA"))

Arguments

model

Either of fitted object of class Arima (i.e., the output of either stats::arima() or arima), a list with named elements at least one of the named elements ar or ma, or a vector with named elements, such as c("ar1" = 0.3, "ar2" = -0.2, "ma1" = 0.14) Seasonal coefficients are ignored.

type

character of value "AR" or "MA", indicating whether or not the AR or MA polynomial roots are desired.

Value

A numeric vector containing the roots of the MA or AR polynomials

Examples

set.seed(123456)
ARMApolyroots(sample_ARMA_coef((order = c(2, 1))), type = "AR")

mod <- arima(lh, order = c(3,0,0))
ARMApolyroots(mod, type = "AR")

[Package arima2 version 3.1.0 Index]