Skip to main content

Module levinson

Module levinson 

Source
Expand description

Levinson–Durbin recursion: Yule–Walker AR fits of every order 1..=K in O(K²), yielding the PACF and the innovation variance of each order.

This single recursion feeds both estimator families: the information criteria need sigma2[k] for every k; the Fine–Hwang estimators need the PACF (reflection[k]) or the long-AR coefficients (phi_last).

Structs§

Levinson
Output of levinson.

Functions§

burg_from_series
Burg’s method (Burg 1967; Kay & Marple 1981): each reflection coefficient is chosen to minimise the sum of forward and backward prediction error power, so the fitted AR is always stationary and behaves better than Yule–Walker near the unit circle. Returns the same shape as levinson; sigma2[0] is the biased sample variance and sigma2[k] = sigma2[k-1] (1 - κ_k²).
levinson
Run Levinson–Durbin on autocovariances r[0..=K].
levinson_from_series
Convenience: autocovariance + Levinson in one call.