HistoricalDecompositionResult#
- class impulso.results.HistoricalDecompositionResult(*, idata, var_names)[source]#
Bases:
VARResultBaseResult from the propagated historical decomposition.
The posterior-predictive Dataset carries two variables: “hd” — the propagated contribution of each structural shock — and “baseline” — the deterministic path implied by the initial conditions, intercept, and any exogenous regressors with all shocks set to zero. Baseline plus the contributions summed over shocks reproduces the observed series exactly for every posterior draw.
- idata#
InferenceData-schema container with decomposition draws.
- baseline()[source]#
Posterior median of the deterministic baseline path.
- Returns:
DataFrame indexed by the same DatetimeIndex as median(), with one column per variable.
- Raises:
ValueError – If the result carries no “baseline” variable (e.g. a hand-built result predating the propagated decomposition).
- Return type:
- deviation()[source]#
Posterior median of the total deviation from the deterministic baseline.
Median of the per-draw sum of contributions over shocks, so it matches data - baseline() exactly; because median-of-sum differs from sum-of-medians, it need not equal median() summed over the shock column level.
- Returns:
DataFrame indexed by the same DatetimeIndex as median(), with one column per variable.
- Return type:
- median()[source]#
Posterior median historical decomposition.
- Returns:
DataFrame indexed by a DatetimeIndex over the in-sample period (after lag-trimming and any start / end filter applied at decomposition time), with a MultiIndex([‘response’, ‘shock’]) on columns.
- Return type:
- model_config = {'arbitrary_types_allowed': True, 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].