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

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

Arguments

x

time series

iterate

the number of iteration only for non-seasonal series

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

See also

Examples

data(gold) tsoutliers(gold)
#> $index #> [1] 770 #> #> $replacements #> [1] 494.9 #>