SETARResult.regime_weight#
- property SETARResult.regime_weight: NDArray[float64][source]#
1.0above the threshold, else0.0.The comparison is strict on the upper side, matching the estimator’s
z <= rassignment to the lower regime, so a transition value landing exactly on the threshold is counted the same way here as it was when the coefficients were solved for. Its sum isn_upperand its mean isupper_fraction.Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> y = np.zeros(300) >>> for t in range(1, 300): ... y[t] = (0.6 if y[t - 1] <= 0.0 else -0.4) * y[t - 1] + rng.standard_normal() >>> res = SETAR(y, order=1, delay=1).fit() >>> weight = res.regime_weight >>> weight.shape, int(weight.sum()) == res.n_upper, set(np.unique(weight)) == {0.0, 1.0} ((299,), True, True)
- Type:
Indicator of the upper regime