Decomposes a time series into trend, seasonal and residual components
using loess
.
decompositionplot(...)
The original iNZightTS
object with an item decompVars
appended, containing results from the decomposition.
additional arguments, ignored
If the frequency is greater than 1, the components are found using the
stl
function with s.window
set to TRUE
(effectively replacing smoothing by taking the mean).
If the frequency is 1, the trend component is found directly by using
loess
and the residuals are the difference between trend
and actual values.
The trend, seasonal and residual components are plotted on the same
scale allowing for easy visual analysis.
R. B. Cleveland, W. S. Cleveland, J.E. McRae, and I. Terpenning (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. Journal of Official Statistics, 6, 3iV73.