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

Partial autocorrelation estimated

  • x (1d array) – observations of time series for which pacf is calculated
  • nlags (int) – largest lag for which pacf is returned
  • method ({'ywunbiased', 'ywmle', 'ols'}) –

    specifies which method for the calculations to use:

    • yw or ywunbiased : yule walker with bias correction in denominator for acovf. Default.
    • 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 (float, 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))
  • pacf (1d array) – partial autocorrelations, nlags elements, including lag zero
  • confint (array, optional) – Confidence intervals for the PACF. Returned if confint is not None.


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.