Learn R Programming

arima2 (version 3.3.0)

ARMApolyroots: 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"))

Value

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

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.

Examples

Run this code
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")

Run the code above in your browser using DataLab