DressRehearsalResult#

class causalpy.experiments.sc_results.DressRehearsalResult[source]#

Result of a dress-rehearsal design validation.

Produced by SyntheticControl.validate_design().

injected_effect#

The effect that was injected into the pseudo-post window.

Type:

float

effect_type#

Whether the injected effect was "relative" or "absolute".

Type:

str

recovered_effect_mean#

Posterior mean of the cumulative impact in the pseudo-post window.

Type:

float

recovered_effect_hdi#

94% HDI of the cumulative impact posterior.

Type:

tuple[float, float]

hdi_covers_truth#

Whether the HDI interval contains the injected truth.

Type:

bool

posterior_samples#

Raw posterior draws of cumulative impact.

Type:

xr.DataArray

injected_truth#

The actual numeric value injected (after conversion from relative to absolute if applicable).

Type:

float

Methods

DressRehearsalResult.__init__(...)

DressRehearsalResult.plot()

Plot injected vs recovered effect with HDI band.

DressRehearsalResult.summary()

Return a DataFrame with recovery statistics.

DressRehearsalResult.to_check_result()

Convert to a CheckResult for sensitivity pipeline integration.

Attributes

__init__(injected_effect, effect_type, recovered_effect_mean, recovered_effect_hdi, hdi_covers_truth, posterior_samples, injected_truth)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#