Learn R Programming

tfarima (version 0.4.1)

lagpol0: Create lag polynomial objects

Description

`lagpol0` is a flexible constructor for lagpol objects. It accepts multiple input formats: polynomial orders \((d, s, p)\), literal equations (e.g., \(1 - 0.8B\)), or seasonal specifications for special lag polynomials like \(AR/I/MA(s-1)\).

Usage

lagpol0(op, type, envir = parent.frame())

Value

List of lagpol objects.

Arguments

op

Polynomial specification in one of these formats:

  • Numeric vector \(c(d, s, p)\) specifying polynomial degree, lag step (default 1), and exponent (default 1)

  • Character equation (e.g., "1 - 0.8B")

  • Seasonal period or frequency (e.g., "12" or "1/12")

  • List combining multiple specifications

type

Operator type: "ar" (autoregressive), "ma" (moving average), or "i" (integration).

envir

Environment for argument evaluation. Defaults to parent frame.

See Also

lagpol

Examples

Run this code
# AR(1) polynomial
lagpol0(op = 1, type = "ar")

# From literal equation
lagpol0(op = "1 - 0.8B", type = "ar")

# Multiple polynomials at once
lagpol0(op = list(1, "1 - 0.5B"), type = "ma")

# Seasonal polynomial
lagpol0(op = "12", type = "ar")

# Custom orders with seasonal component
lagpol0(op = c(2, 12, 1), type = "ar")

Run the code above in your browser using DataLab