RegimeSystemResult#

class cultivars.multivariate.regime_switching.markov_switching.RegimeSystemResult(*, index, names, order, trend, coefficients, deterministic, sigma_u, resid, weight, nobs)[source]#

One regime of a fitted regime model, dressed as a closed linear system.

The interchange view of the regime families, on the pattern _ConditionalLevels set for the global model: a public result produces it, the identification layer consumes it, and users receive it without ever constructing it. Conditional on its regime the model is a linear VAR, and this view exposes exactly the closed-system surface an identification model reads – labels, coefficients, an innovation covariance, residuals, and a moving-average representation – so it passes anywhere a fitted VAR result passes as an identification source.

Two honesty notes on the statistical members. nobs is the expected number of periods governed by this regime – the sum of its weights, a float, because under a latent chain no date belongs to a regime with certainty. resid is the full-sample residuals under this regime’s parameters, weighted by the square root of the regime weights and scaled so their second moment matches sigma_u; a scheme that only reads the covariance (recursive, long-run, short-run) is unaffected, while a scheme that reads residual moments directly is consuming a weight-averaged object and should be interpreted accordingly.

Variables:
  • index (int) – This regime’s label under the producing fit’s convention.

  • names (tuple[str, ...]) – Variable labels, in column order.

  • order (int) – Autoregressive order.

  • trend (str) – Deterministic specification.

  • coefficients (NDArray[double]) – (p, k, k) lag stack of this regime.

  • deterministic (NDArray[double]) – This regime’s deterministic coefficients.

  • sigma_u (NDArray[double]) – This regime’s innovation covariance.

  • resid (NDArray[double]) – Probability-weighted residuals, aligned with the effective sample.

  • weight (NDArray[double]) – This regime’s weights – smoothed probabilities for a latent chain – one per effective row.

  • nobs (float) – Expected periods governed by this regime.

See also

Attributes#

index

This regime's label under the producing fit's convention.

names

Variable labels, in column order.

order

Autoregressive order.

trend

Deterministic specification.

coefficients

(p, k, k) lag stack of this regime.

deterministic

This regime's deterministic coefficients.

sigma_u

This regime's innovation covariance.

resid

Probability-weighted residuals, aligned with the effective sample.

weight

This regime's weights -- smoothed probabilities for a latent chain -- one per effective row.

nobs

Expected periods governed by this regime.

is_stable

Whether this regime, read as a linear VAR, is stable.

k_endog

Number of endogenous variables.

Methods#

ma_representation([horizon])

Moving-average matrices of this regime, held frozen.

stability_check()

Companion-eigenvalue verdict for this regime's lag stack.