add_um: Addition or substraction of univariate (ARIMA) models

View source: R/um.R

add_umR Documentation

Addition or substraction of univariate (ARIMA) models

Description

add_um creates a univariate (ARIMA) model from the addition or substraction of two univariate (arima) models.

Usage

add_um(um1, um2, add = TRUE, tol = 1e-05)

Arguments

um1, um2

Two "um" S3 objects.

add

logical. If FALSE, the second model is substracted from the first one.

tol

tolerance to check if a value is null.

Value

A "um" S3 object.

Note

The + and - operators can also be used to add or substract ARIMA models.

Examples

um1 <- um(i = "(1 - B)", ma = "(1 - 0.8B)")
um2 <- um(i = "(1 - B12)", ma = "(1 - 0.8B^12)")
um3 <- add_um(um1, um2)
um4 <- um3 - um2

tfarima documentation built on Nov. 5, 2025, 7:43 p.m.