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

gallegoj/tfarima documentation built on March 31, 2024, 10:32 a.m.