MarkovSwitchingDFMResult.recession_probabilities#

MarkovSwitchingDFMResult.recession_probabilities()[source]#

Smoothed probability of the low-mean regime, per period.

The business-cycle chronology: with the factor built from pro-cyclical indicators, the low-mean state is the contraction.

Return type:

NDArray[double]

Returns:

smoothed_prob[:, 0], shape (nobs,).

Example

>>> import numpy as np
>>> res = MarkovSwitchingDFMResult(
...     panel=np.zeros((80, 3)), series_names=("ip", "emp", "sales"),
...     loadings=np.array([1.0, 0.8, 1.2]), idiosyncratic_var=np.full(3, 0.3),
...     phi=0.6, sigma_v=0.5, mu=np.array([-1.5, 0.5]),
...     regime_transition=np.array([[0.8, 0.2], [0.05, 0.95]]),
...     factor=np.zeros(80), filtered_prob=np.full((80, 2), 0.5),
...     smoothed_prob=np.tile([0.1, 0.9], (80, 1)), means=np.zeros(3),
...     scales=np.ones(3), llf=-100.0, n_params=11, converged=True,
... )
>>> bool(np.allclose(res.recession_probabilities(), 0.1))
True