MIDASVAR.fit#
- MIDASVAR.fit()[source]#
Estimate the system by profiled maximum likelihood.
Conditional on the polynomial parameters the model is linear, so the inner problem is one least-squares solve with the covariance concentrated out; the outer search is derivative-free over the two parameters per high-frequency series, multi-started because the decay direction can be multi-modal.
- Return type:
- Returns:
The fitted result.
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)]) >>> res = MIDASVAR(y, x, order=1, period=3).fit() >>> res.theta.shape, res.exog.shape, res.design.shape ((1, 2), (119, 1), (119, 4)) >>> bool(np.allclose(res.design[:, -1:], res.exog)) True