add_anomaly: Anomaly Component

View source: R/methods.R

add_anomaly.tsissm.componentR Documentation

Anomaly Component

Description

Anomaly Component

Usage

## S3 method for class 'tsissm.component'
add_anomaly(x, time = NULL, delta = 0, ratio = 0.5, ...)

add_anomaly(x, ...)

Arguments

x

an object of class tsissm.component or other supported class.

time

the numeric index of when the anomaly occurs. If NULL, a ranom time will be chosen.

delta

the autoregressive component determining the type of anomaly. A value of zero results in an additive outlier, a value of 1 in a level shift and anything in between a temporary change with a half life of -log(2)/log(delta).

ratio

the anomaly to series ratio at the time it occurs. For instance, a value of 1 means that the anomaly will jump by 100 percent compared to the data series.

...

additional parameters.

Value

An object of class tsissm.component updated with the anomaly component.


tsmodels/tssimulator documentation built on April 29, 2024, 9:11 a.m.