statsmodels.tsa.filters.filtertools.miso_lfilter#

statsmodels.tsa.filters.filtertools.miso_lfilter(ar, ma, x, useic=False)[source]#

Filter multiple time series into a single time series.

Uses a convolution to merge inputs, and then lfilter to produce output.

Parameters:
ararray_like

The coefficients of autoregressive lag polynomial including lag zero, ar(L) in the expression ar(L)y_t.

maarray_like

The coefficient of the moving average lag polynomial, ma(L) in ma(L)x_t. Must have the same number of dimensions as x; currently only 2d is supported.

xarray_like

The 2-d input data series, time in rows, variables in columns.

useicarray_like or bool, optional

Initial conditions for the AR filter, as accepted by scipy.signal.lfiltic (i.e. an array_like of the initial values of the filtered series, of length ar.shape[0] - 1). Use the default, False, for zero initial conditions.

Returns:
yndarray

The filtered output series.

inpndarray, 1d

The combined input series.

Notes

currently for 2d inputs only, no choice of axis Use of signal.lfilter requires that ar lag polynomial contains floating point numbers does not cut off invalid starting and final values

miso_lfilter finds array y such that:

ar(L)y_t = ma(L)x_t

with shapes y (nobs,), x (nobs, nvars), ar (narlags,), and ma (narlags, nvars).