statsmodels.tsa.stattools.levinson_durbin

statsmodels.tsa.stattools.levinson_durbin(s, nlags=10, isacov=False)[source]

Levinson-Durbin recursion for autoregressive processes.

Parameters:
sarray_like

If isacov is False, then this is the time series. If iasacov is true then this is interpreted as autocovariance starting with lag 0.

nlagsint, optional

The largest lag to include in recursion or order of the autoregressive process.

isacovbool, optional

Flag indicating whether the first argument, s, contains the autocovariances or the data series.

Returns:
sigma_vfloat

The estimate of the error variance.

arcoefsndarray

The estimate of the autoregressive coefficients for a model including nlags.

pacfndarray

The partial autocorrelation function.

sigmandarray

The entire sigma array from intermediate result, last value is sigma_v.

phindarray

The entire phi array from intermediate result, last column contains autoregressive coefficients for AR(nlags).

Notes

This function returns currently all results, but maybe we drop sigma and phi from the returns.

If this function is called with the time series (isacov=False), then the sample autocovariance function is calculated with the default options (biased, no fft).


Last update: Nov 14, 2024