statsmodels.tsa.seasonal.seasonal_decompose(x, model='additive', filt=None, freq=None, two_sided=True, extrapolate_trend=0)
[source]
Seasonal decomposition using moving averages
Parameters: |
|
---|---|
Returns: |
results – A object with seasonal, trend, and resid attributes. |
Return type: |
obj |
This is a naive decomposition. More sophisticated methods should be preferred.
The additive model is Y[t] = T[t] + S[t] + e[t]
The multiplicative model is Y[t] = T[t] * S[t] * e[t]
The seasonal component is first removed by applying a convolution filter to the data. The average of this smoothed series for each period is the returned seasonal component.
See also
statsmodels.tsa.filters.bk_filter.bkfilter
, statsmodels.tsa.filters.cf_filter.xffilter
, statsmodels.tsa.filters.hp_filter.hpfilter
, statsmodels.tsa.filters.convolution_filter
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.seasonal_decompose.html