MarkovSwitchingSVARResult.structural#

MarkovSwitchingSVARResult.structural(regime)[source]#

One regime’s structural result, with its full scheme surface.

Parameters:

regime (int) – Regime label in 0..M-1.

Return type:

StructuralResult

Returns:

The StructuralResult identified from that regime.

Raises:

SpecificationError – If regime is out of range.

Example

>>> 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)
>>> svar = MarkovSwitchingSVAR(res).identify()
>>> one = svar.structural(1)
>>> type(one).__name__, one.scheme, one.fevd(4).shape
('SVARResult', 'recursive', (5, 2, 2))
>>> svar.structural(2)
Traceback (most recent call last):
cultivars.exceptions.SpecificationError: regime must be in 0..1; got 2.