MIDASVARResult.midas_weights#
- property MIDASVARResult.midas_weights: NDArray[float64][source]#
The estimated weight curves,
(midas_lags, m), most recent first.Each column sums to one; a column that decays toward zero within the window is the sign that
midas_lagsis long enough.Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> x = rng.standard_normal((360, 1)) >>> window = 0.7 * x[2::3, 0] + 0.3 * x[1::3, 0] >>> noise = 0.1 * rng.standard_normal(120) >>> y = np.column_stack([window + noise, rng.standard_normal(120)]) >>> weights = MIDASVAR(y, x, order=1, period=3, midas_lags=6).fit().midas_weights >>> weights.shape, bool(np.isclose(weights.sum(), 1.0)), weights.ravel().round(2) ((6, 1), True, array([0.69, 0.3 , 0.01, 0. , 0. , 0. ]))