Learn R Programming

tfarima (version 0.4.1)

add_um: 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)

Value

A "um" S3 object.

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.

Examples

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

Run the code above in your browser using DataLab