tsa.tsatools.detrend()

statsmodels.tsa.tsatools.detrend

statsmodels.tsa.tsatools.detrend(x, order=1, axis=0) [source]

Detrend an array with a trend of given order along axis 0 or 1

Parameters:

x : array_like, 1d or 2d

data, if 2d, then each row or column is independently detrended with the same trendorder, but independent trend estimates

order : int

specifies the polynomial order of the trend, zero is constant, one is linear trend, two is quadratic trend

axis : int

axis can be either 0, observations by rows, or 1, observations by columns

Returns:

detrended data series : ndarray

The detrended series is the residual of the linear regression of the data on the trend of given order.

© 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.tsatools.detrend.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部