MarkovSwitchingVARResult.regime_uncertainty#

property MarkovSwitchingVARResult.regime_uncertainty: float[source]#

Mean posterior entropy, normalized so 0 is sharp and 1 flat.

Near zero, the regimes are cleanly separated; near one, the data barely distinguish them at all – which no coefficient table shows.

Example

Well-separated means give a sharp posterior:

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> s = np.repeat([0, 1, 0, 1], 100)
>>> y = np.array([[-1.0, -0.5], [1.5, 1.0]])[s] + 0.4 * rng.standard_normal((400, 2))
>>> res = MarkovSwitchingVAR(y, order=1, n_regimes=2).fit(seed=0)
>>> bool(res.regime_uncertainty < 0.05)
True