diff_diff.SunAbrahamResults
- class diff_diff.SunAbrahamResults[source]
Bases:
objectResults from Sun-Abraham (2021) interaction-weighted estimation.
- event_study_effects
Dictionary mapping relative time to effect dictionaries with keys: ‘effect’, ‘se’, ‘t_stat’, ‘p_value’, ‘conf_int’, ‘n_groups’.
- Type:
- overall_att
Overall average treatment effect (weighted average of post-treatment effects).
- Type:
- __init__(event_study_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, cohort_weights, groups, time_periods, n_obs, n_treated_units, n_control_units, alpha=0.05, control_group='never_treated', bootstrap_results=None, cohort_effects=None)
- Parameters:
- Return type:
None
Methods
__init__(event_study_effects, overall_att, ...)print_summary([alpha])Print summary to stdout.
summary([alpha])Generate formatted summary of estimation results.
to_dataframe([level])Convert results to DataFrame.
Attributes
Check if overall ATT is significant.
Significance stars for overall ATT.
- bootstrap_results: SABootstrapResults | None = None
- print_summary(alpha=None)[source]
Print summary to stdout.
- Parameters:
alpha (float | None)
- Return type:
None
- to_dataframe(level='event_study')[source]
Convert results to DataFrame.
- Parameters:
level (str, default="event_study") – Level of aggregation: “event_study” or “cohort”.
- Returns:
Results as DataFrame.
- Return type:
pd.DataFrame
- __init__(event_study_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, cohort_weights, groups, time_periods, n_obs, n_treated_units, n_control_units, alpha=0.05, control_group='never_treated', bootstrap_results=None, cohort_effects=None)
- Parameters:
- Return type:
None