BaseExperiment.effect_summary#
- abstractmethod BaseExperiment.effect_summary(*, window='post', direction='increase', alpha=0.05, cumulative=True, relative=True, min_effect=None, treated_unit=None, period=None, prefix='Post-period', **kwargs)[source]#
Generate a decision-ready summary of causal effects.
- Parameters:
window (
Union[Literal['post'],tuple,slice]) –Time window for analysis (ITS/SC only, ignored for DiD/RD):
”post”: All post-treatment time points (default)
(start, end): Tuple of start and end times (handles both datetime and integer indices)
slice: Python slice object for integer indices
direction (
Literal['increase','decrease','two-sided']) –Direction for tail probability calculation (PyMC only, ignored for OLS):
”increase”: P(effect > 0)
”decrease”: P(effect < 0)
”two-sided”: Two-sided p-value, report 1-p as “probability of effect”
alpha (
float) – Significance level for HDI/CI intervals (1-alpha confidence level). For Bayesian models the effective HDI probability ishdi_prob = 1 - alpha. Note that this is independent of the project-wideHDI_PROBconstant (currently 0.94) used byplot()andget_plot_data_bayesian(), so the same experiment may report a 95% HDI ineffect_summary()and a 94% HDI inplot()with default settings.cumulative (
bool) – Whether to include cumulative effect statistics (ITS/SC only, ignored for DiD/RD)relative (
bool) – Whether to include relative effect statistics (% change vs counterfactual) (ITS/SC only, ignored for DiD/RD)min_effect (
float|None) – Region of Practical Equivalence (ROPE) threshold (PyMC only, ignored for OLS). If provided, reportsP(|effect| > min_effect)for two-sided orP(effect > min_effect)for one-sided.treated_unit (
str|None) – For multi-unit experiments (Synthetic Control), specify which treated unit to analyze. If None and multiple units exist, uses first unit.period (
Optional[Literal['intervention','post','comparison']]) – For experiments with multiple periods (e.g., three-period ITS), specify which period to summarize. Defaults to None for standard behavior.prefix (
str) – Prefix for prose generation (e.g., “During intervention”, “Post-intervention”). Defaults to “Post-period”.kwargs (Any)
- Returns:
Object with .table (DataFrame) and .text (str) attributes. The .text attribute contains a detailed multi-paragraph narrative report.
- Return type:
EffectSummary