tsclean {forecast}R Documentation

Identify and replace outliers and missing values in a time series

Description

Uses loess for non-seasonal series and a periodic stl decompostion with seasonal series to identify and replace outliers. To estimate missing values, linear interpolation is used for non-seasonal series, and a periodic stl decompostion is used with seasonal series.

Usage

tsclean(x, replace.missing = TRUE, lambda = NULL)

Arguments

x

time series

replace.missing

If TRUE, it not only replaces outliers, but also interpolates missing values

lambda

a numeric value giving the Box-Cox transformation parameter

Value

Time series

Author(s)

Rob J Hyndman

See Also

na.interp, tsoutliers

Examples

data(gold)
tsclean(gold)

[Package forecast version 5.9 Index]