View source: R/ts_fil_lowess.R
| ts_fil_lowess | R Documentation |
Locally Weighted Scatterplot Smoothing (LOWESS) fits local regressions to capture the primary trend while reducing noise and spikes.
ts_fil_lowess(f = 0.2)
f |
smoothing parameter. The larger this value, the smoother the series will be. This provides the proportion of points on the plot that influence the smoothing. |
A ts_fil_lowess object.
W. S. Cleveland (1979). Robust locally weighted regression and smoothing scatterplots. Journal of the American Statistical Association.
# time series with noise
library(daltoolbox)
data(tsd)
tsd$y[9] <- 2*tsd$y[9]
# filter
filter <- ts_fil_lowess(f = 0.2)
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.