MarkovSwitchingARResult.regime_shares#

property MarkovSwitchingARResult.regime_shares: NDArray[float64][source]#

Average smoothed probability of each regime over the sample.

The posterior counterpart to a frequency count, and the honest one: counting most_likely_regime throws away every date the model was genuinely uncertain about. Compare against ergodic_prob – a large gap says the sample is not representative of the fitted chain.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> res = MarkovSwitchingAR(rng.standard_normal(300), order=1).fit(seed=0, n_init=2)
>>> res.regime_shares.shape, round(float(res.regime_shares.sum()), 6)
((2,), 1.0)