RegressionKink.effect_summary#
- RegressionKink.effect_summary(window='post', direction='increase', alpha=0.05, cumulative=True, relative=True, min_effect=None, treated_unit=None, include_pretrend_check=True)#
Generate a decision-ready summary of causal effects.
Supports Interrupted Time Series (ITS), Synthetic Control, Difference-in-Differences (DiD), Regression Discontinuity (RD), and Event Study experiments. Works with both PyMC (Bayesian) and OLS models. Automatically detects experiment type and model type, generating appropriate summary.
- Parameters:
window (str, tuple, or slice, default="post") – Time window for analysis (ITS/SC only, ignored for DiD/RD/EventStudy): - “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 ({"increase", "decrease", "two-sided"}, default="increase") – 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, default=0.05) – Significance level for HDI/CI intervals (1-alpha confidence level)
cumulative (bool, default=True) – Whether to include cumulative effect statistics (ITS/SC only, ignored for DiD/RD/EventStudy)
relative (bool, default=True) – Whether to include relative effect statistics (% change vs counterfactual) (ITS/SC only, ignored for DiD/RD/EventStudy)
min_effect (float, optional) – Region of Practical Equivalence (ROPE) threshold (PyMC only, ignored for OLS). If provided, reports P(|effect| > min_effect) for two-sided or P(effect > min_effect) for one-sided.
treated_unit (str, optional) – For multi-unit experiments (Synthetic Control), specify which treated unit to analyze. If None and multiple units exist, uses first unit.
include_pretrend_check (bool, default=True) – Whether to include parallel trends analysis in prose summary (Event Study only). When True, checks if pre-treatment coefficient HDIs include zero.
- Returns:
Object with .table (DataFrame) and .text (str) attributes
- Return type:
EffectSummary