TimeSeriesSRC.impest

TimeSeriesSRC.impest(u, y, k)

Estimate the impulse response between two sequences (Wiener-Hopf method).

Solves the Wiener-Hopf equations \(R_{uu}\, g = R_{uy}\) for the finite impulse response g of length k+1.

Parameters:
  • u (array-like, shape (1, N)) – Input (exogenous) sequence.

  • y (array-like, shape (1, N)) – Output sequence (same length as u).

  • k (int) – Number of lags of the impulse response to compute; the result covers lags 0 through k.

Returns:

g – Estimated impulse response coefficients g[0], g[1], …, g[k].

Return type:

ndarray, shape (k+1,)

Examples

>>> import numpy as np
>>> from scipy.signal import lfilter
>>> from TimeSeriesSRC.basefunctions.impest import func_impest
>>> rng = np.random.default_rng(0)
>>> u = rng.standard_normal((1, 300))
>>> e = rng.standard_normal((1, 300)) * 0.1
>>> y = lfilter([1], [1, 0.5], u[0]).reshape(1, -1) + e
>>> g = func_impest(u, y, k=10)
>>> g.shape
(11,)

See also

multiAnal

Higher-level multivariate analysis that calls this function.