pacf_ols(x, nlags=None, efficient=True, adjusted=False)¶
Calculate partial autocorrelations via OLS.
Observations of time series for which pacf is calculated.
Number of lags for which pacf is returned. Lag 0 is not returned.
If true, uses the maximum number of available observations to compute each partial autocorrelation. If not, uses the same number of observations to compute all pacf values.
Adjust each partial autocorrelation by n / (n - lag).
The partial autocorrelations, (maxlag,) array corresponding to lags 0, 1, …, maxlag.
This solves a separate OLS estimation for each desired lag using method in . Setting efficient to True has two effects. First, it uses nobs - lag observations of estimate each pacf. Second, it re-estimates the mean in each regression. If efficient is False, then the data are first demeaned, and then nobs - maxlag observations are used to estimate each partial autocorrelation.
The inefficient estimator appears to have better finite sample properties. This option should only be used in time series that are covariance stationary.
OLS estimation of the pacf does not guarantee that all pacf values are between -1 and 1.
Box, G. E., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: forecasting and control. John Wiley & Sons, p. 66