Cholesky#
- class impulso.identification.Cholesky(*, ordering)[source]#
Bases:
ImpulsoModelCholesky identification scheme.
Uses the lower-triangular Cholesky decomposition of the residual covariance matrix to identify structural shocks. Variable ordering determines the causal ordering.
- identify(L, var_names, posterior=None, data=None, n_lags=None)[source]#
Apply Cholesky identification.
For default variable ordering, identify is a no-op and returns L unchanged. When self.ordering differs from var_names, the underlying covariance is permuted and re-decomposed so the Cholesky factor reflects the requested causal ordering.
- Parameters:
L (ndarray) – Lower-triangular Cholesky factor, shape (chains, draws, n_vars, n_vars).
var_names (list[str]) – Variable names in the data’s natural order.
posterior (xr.Dataset | None) – Unused. Accepted for Protocol uniformity.
data (VARData | None) – Unused. Accepted for Protocol uniformity.
n_lags (int | None) – Unused. Accepted for Protocol uniformity.
- Returns:
Structural shock matrix, shape (chains, draws, n_vars, n_vars).
- Return type:
- model_config = {'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].