HistoricalDecompositionResult#

class impulso.results.HistoricalDecompositionResult(*, idata, var_names)[source]#

Bases: VARResultBase

Result from historical decomposition.

Parameters:
  • idata (InferenceData)

  • var_names (list[str])

idata#

ArviZ InferenceData with decomposition draws.

var_names#

Names of variables.

Type:

list[str]

hdi(prob=0.89)[source]#

HDI for historical decomposition.

Returns:

HDIResult whose lower / upper DataFrames mirror the shape and labels of median().

Parameters:

prob (float)

Return type:

HDIResult

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:

DataFrame

model_config = {'arbitrary_types_allowed': True, 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plot()[source]#

Plot historical decomposition.

Return type:

Figure

to_dataframe()[source]#

Convert historical decomposition to DataFrame (passthrough to median()).

Return type:

DataFrame