tsa.stattools.pacf()

statsmodels.tsa.stattools.pacf

statsmodels.tsa.stattools.pacf(x, nlags=40, method='ywunbiased', alpha=None) [source]

Partial autocorrelation estimated

Parameters:

x : 1d array

observations of time series for which pacf is calculated

nlags : int

largest lag for which pacf is returned

method : ‘ywunbiased’ (default) or ‘ywmle’ or ‘ols’

specifies which method for the calculations to use:

  • yw or ywunbiased : yule walker with bias correction in denominator for acovf
  • ywm or ywmle : yule walker without bias correction
  • ols - regression of time series on lags of it and on constant
  • ld or ldunbiased : Levinson-Durbin recursion with bias correction
  • ldb or ldbiased : Levinson-Durbin recursion without bias correction

alpha : scalar, optional

If a number is given, the confidence intervals for the given level are returned. For instance if alpha=.05, 95 % confidence intervals are returned where the standard deviation is computed according to 1/sqrt(len(x))

Returns:

pacf : 1d array

partial autocorrelations, nlags elements, including lag zero

confint : array, optional

Confidence intervals for the PACF. Returned if confint is not None.

Notes

This solves yule_walker equations or ols for each desired lag and contains currently duplicate calculations.

© 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.stattools.pacf.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部