View source: R/ts_fil_smooth.R
| ts_fil_smooth | R Documentation |
Remove or reduce randomness (noise) using a robust smoothing strategy that first mitigates outliers and then smooths residual variation.
ts_fil_smooth()
A ts_fil_smooth object.
# Robust smoothing with iterative outlier mitigation
# Load package and example data
library(daltoolbox)
data(tsd)
tsd$y[9] <- 2 * tsd$y[9] # inject an outlier
# Fit smoother and transform to reduce spikes/noise
filter <- ts_fil_smooth()
filter <- fit(filter, tsd$y)
y <- transform(filter, tsd$y)
# Compare original vs smoothed series
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.