# tsclean

From forecast v8.12
by Rob Hyndman

##### Identify and replace outliers and missing values in a time series

Uses supsmu for non-seasonal series and a robust STL decomposition for seasonal series. To estimate missing values and outlier replacements, linear interpolation is used on the (possibly seasonally adjusted) series

- Keywords
- ts

##### 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
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

Time series

##### See Also

##### Examples

```
# NOT RUN {
cleangold <- tsclean(gold)
# }
```

*Documentation reproduced from package forecast, version 8.12, License: GPL-3*

### Community examples

Looks like there are no examples yet.