trend,decomp-method | R Documentation |
The provided methods work for decomposition objects created within this package. They allow the user to retrieve individual components among the estimated ones.
## S4 method for signature 'decomp'
trend(object, ...)
## S4 method for signature 'decomp'
season(object, ...)
## S4 method for signature 'decomp'
fitted(object, ...)
## S4 method for signature 'decomp'
residuals(object, ...)
## S4 method for signature 'decomp'
deseasonalize(object, ...)
## S4 method for signature 'decomp'
detrend(object, ...)
object |
the estimation / decomposition object, for example
of class |
... |
without further use; implemented for compatibility only. |
Apply these functions directly to an estimation object, i.e. the result of a decomposition of a seasonal time series, in order to retrieve individual estimated components.
These methods return time series objects of class "ts"
that represent
the corresponding estimated component in the time series originally used in
the estimation process.
Xt <- log(EXPENDITURES)
smoothing_options <- set_options(order_poly = 3)
est <- deseats(Xt, smoothing_options = smoothing_options)
trend_e <- trend(est) # Trend estimates
season_e <- season(est) # Seasonality estimates
trend_season_e <- fitted(est) # Trend + seasonality estimates
resid_e <- residuals(est) # Residuals (observ. - trend - seasonality)
ts_adj <- deseasonalize(est) # Seasonally adjusted series
ts_notrend <- detrend(est) # Detrended series
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.