tsa.statespace.tools.diff()

statsmodels.tsa.statespace.tools.diff

statsmodels.tsa.statespace.tools.diff(series, k_diff=1, k_seasonal_diff=None, seasonal_periods=1) [source]

Difference a series simply and/or seasonally along the zero-th axis.

Given a series (denoted y_t), performs the differencing operation

\Delta^d \Delta_s^D y_t

where d = diff, s = seasonal_periods, D = seasonal_diff, and \Delta is the difference operator.

Parameters:

series : array_like

The series to be differenced.

diff : int, optional

The number of simple differences to perform. Default is 1.

seasonal_diff : int or None, optional

The number of seasonal differences to perform. Default is no seasonal differencing.

seasonal_periods : int, optional

The seasonal lag. Default is 1. Unused if there is no seasonal differencing.

Returns:

differenced : array

The differenced array.

© 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.statespace.tools.diff.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部