Smoothes a 'timeSeries' object.
1 2 3
an univariate 'timeSeries' object.
the lowess smoother span. This gives the proportion of points in the plot which influence the smooth at each value. Larger values give more smoothness.
smoothing parameter, typically (but not necessarily) in
(0,1]. By default
controls the smoothness of the fitted curve. Values of up to 10 indicate increasing smoothness.
optional arguments to be passed to the underlying smoothers.
allow to smooth
timeSerie object. The are interfaces to the
smooth.spline in R's
... arguments allow to pass optional arguments to the
stats functions and tailor the smoothing process.
We refer to the manual pages of these functions for a proper setting
of these options.
returns a bivariate 'timeSeries' object, the first column holds the original time series data, the second the smoothed series.
The R core team for the underlying smoother functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
## Use Close from MSFT's Price Series - head(MSFT) MSFT.CLOSE <- MSFT[, "Close"] head(MSFT.CLOSE) ## Plot Original and Smoothed Series by Lowess - MSFT.LOWESS <- smoothLowess(MSFT.CLOSE, f = 0.1) head(MSFT.LOWESS) plot(MSFT.LOWESS) title(main = "Close - Lowess Smoothed") ## Plot Original and Smoothed Series by Splines - MSFT.SPLINE <- smoothSpline(MSFT.CLOSE, spar = 0.4) head(MSFT.SPLINE) plot(MSFT.SPLINE) title(main = "Close - Spline Smoothed") ## Plot Original and Smoothed Series by Supsmu - MSFT.SUPSMU <- smoothSupsmu(MSFT.CLOSE) head(MSFT.SUPSMU) plot(MSFT.SUPSMU) title(main = "Close - Spline Smoothed")