TVPSVAR.identify#
- TVPSVAR.identify()[source]#
Assemble the impact path under the recursive declaration.
- Return type:
- Returns:
The
TVPSVARResult. For an SV source, the impact at each date is the posterior mean ofA^{-1} diag(exp(h_t / 2))across the kept draws; for a homoskedastic source it is the Cholesky factor of the posterior mean covariance, repeated.
Example
A reordered homoskedastic identification is the Cholesky factor in the new order, written back into the original positions, so it still reproduces the covariance:
>>> import numpy as np >>> y = np.random.default_rng(0).standard_normal((120, 2)) >>> res = TVPVAR(y, order=1, training=30).fit(n_draws=12, n_burn=4, seed=0) >>> plain = TVPSVAR(res).identify().impact(0) >>> flipped = TVPSVAR(res, order=("y2", "y1")).identify().impact(0) >>> bool(np.allclose(plain @ plain.T, res.sigma_u)) True >>> bool(np.allclose(flipped @ flipped.T, res.sigma_u)) True >>> bool(np.allclose(plain, flipped)) False >>> bool(np.isclose(flipped[0, 1], 0.0)) or bool(np.isclose(flipped[1, 0], 0.0)) True