trend,decomp-method {deseats} | R Documentation |
Obtain Individual Components of a Decomposed Time Series
Description
The provided methods work for decomposition objects created within this package. They allow the user to retrieve individual components among the estimated ones.
Usage
## 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, ...)
Arguments
object |
the estimation / decomposition object, for example
of class |
... |
without further use; implemented for compatibility only. |
Details
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.
Value
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.
Examples
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
[Package deseats version 1.1.0 Index]