pmdarima.utils.pacf

pmdarima.utils.pacf(x, nlags=40, method='ywunbiased', alpha=None)[source][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’, ‘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))

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.