| decompose {stats} | R Documentation | 
Decompose a time series into seasonal, trend and irregular components using moving averages. Deals with additive or multiplicative seasonal component.
decompose(x, type = c("additive", "multiplicative"), filter = NULL)
x | 
A time series. | 
type | 
The type of seasonal component. | 
filter | 
A vector of filter coefficients in reverse time order (as for
AR or MA coefficients), used for filtering out the seasonal
component. If NULL, a moving average with symmetric window is
performed. | 
The additive model used is:
Y[t] = T[t] + S[t] + e[t]
The multiplicative model used is:
Y[t] = T[t] * S[t] + e[t]
An object of class "decomposed.ts" with following components:
seasonal | 
The seasonal component (i.e., the repeated seasonal figure) | 
figure | 
The estimated seasonal figure only | 
trend | 
The trend component | 
random | 
The remainder part | 
type | 
The value of type | 
The function stl provides a much more sophisticated
decomposition.
David Meyer David.Meyer@wu-wien.ac.at
m <- decompose(co2) m$figure plot(m)