tsoutliers: Identify and replace outliers in a time series

View source: R/clean.R

tsoutliersR Documentation

Identify and replace outliers in a time series

Description

Uses supsmu for non-seasonal series and a periodic stl decomposition with seasonal series to identify outliers and estimate their replacements.

Usage

tsoutliers(x, iterate = 2, lambda = NULL)

Arguments

x

time series

iterate

the number of iterations required

lambda

Box-Cox transformation parameter. If lambda="auto", then a transformation is automatically selected using BoxCox.lambda. The transformation is ignored if NULL. Otherwise, data transformed before model is estimated.

Value

index

Indicating the index of outlier(s)

replacement

Suggested numeric values to replace identified outliers

Author(s)

Rob J Hyndman

References

Hyndman (2021) "Detecting time series outliers" https://robjhyndman.com/hyndsight/tsoutliers/.

See Also

na.interp, tsclean

Examples


data(gold)
tsoutliers(gold)


forecast documentation built on June 22, 2024, 9:20 a.m.