View source: R/ts_fil_winsor.R
ts_fil_winsor | R Documentation |
This code implements the Winsorization technique on a time series. Winsorization is a statistical method used to handle extreme values in a time series by replacing them with values closer to the center of the distribution.
ts_fil_winsor()
a ts_fil_winsor
obj.
# time series with noise
library(daltoolbox)
data(tsd)
tsd$y[9] <- 2*tsd$y[9]
# filter
filter <- ts_fil_winsor()
filter <- fit(filter, tsd$y)
y <- transform(filter, tsd$y)
# plot
plot_ts_pred(y=tsd$y, yadj=y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.