additive_outlier {tsaux} | R Documentation |
Anomaly Creation
Description
Creates specific types of anomalies given a series.
Usage
additive_outlier(y, time = 1, parameter = 0.5, add = TRUE)
temporary_change(y, time = 1, parameter = 0.5, alpha = 0.7, add = TRUE)
level_shift(y, time = 1, parameter = 0.5, add = TRUE)
Arguments
y |
a univariate xts object or numeric series. |
time |
the time index at which the anomaly takes place. |
parameter |
the coefficient on the anomaly (the percent of the value of y at the specified time index representing the anomaly). |
add |
whether to contaminate the series (add the anomaly to the series) else will return a matrix with the anomaly (without the effect of the parameter). |
alpha |
the AR(1) coefficient for the temporary change which determines how quickly the effect decays. |
Details
These functions allow the generation of anomalies and may be chained together.
Value
Either the contaminated series else a matrix of the anomaly.
Author(s)
Alexios Galanos for this wrapper function.
[Package tsaux version 1.0.0 Index]