pyhctsa.operations.correlation.partial_autocorr

pyhctsa.operations.correlation.partial_autocorr(y, max_tau=10, what_method='ols')

Compute the partial autocorrelation of an input time series.

This function calculates the partial autocorrelation function (PACF) up to a specified lag using either ordinary least squares or Yule-Walker equations.

Parameters:
y : array-like

The input time series as a scalar column vector

max_tau : int, optional

The maximum time-delay to compute PACF values for (default=10)

what_method : {'ols', 'Yule-Walker'}, optional

Method to compute partial autocorrelation (default=’ols’): - ‘ols’: Ordinary least squares regression - ‘Yule-Walker’: Yule-Walker equations method

Returns:

Dictionary containing partial autocorrelations for each lag, with keys:

  • ’pac_1’: PACF at lag 1

  • ’pac_2’: PACF at lag 2

…up to maxTau

Return type:

dict