additive_outlier | R Documentation |
Creates specific types of anomalies given a series.
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)
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. |
These functions allow the generation of anomalies and may be chained together.
Either the contaminated series else a matrix of the anomaly.
Alexios Galanos for this wrapper function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.