diff_diff.StackedDiDResults#
- class diff_diff.StackedDiDResults[source]#
Bases:
objectResults from Stacked DiD estimation (Wing, Freedman & Hollingsworth 2024).
- overall_att#
Overall average treatment effect on the treated (average of post-treatment event-study coefficients).
- Type:
- event_study_effects#
Dictionary mapping event time h to effect dict with keys: ‘effect’, ‘se’, ‘t_stat’, ‘p_value’, ‘conf_int’, ‘n_obs’.
- Type:
dict, optional
- stacked_data#
Full stacked dataset with _sub_exp, _event_time, _D_sa, _Q_weight columns. Accessible for custom analysis.
- Type:
pd.DataFrame
Methods
__init__(overall_att, overall_se, ...[, ...])print_summary([alpha])Print summary to stdout.
summary([alpha])Generate formatted summary of estimation results.
to_dataframe([level])Convert results to DataFrame.
Attributes
anticipationattcluster_namecoef_varSE / abs(overall ATT).
conf_intis_significantCheck if overall ATT is significant.
n_clustersp_valuesesignificance_starsSignificance stars for overall ATT.
survey_metadatat_statvcov_type- __init__(overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, event_study_effects, group_effects, stacked_data, groups=<factory>, trimmed_groups=<factory>, time_periods=<factory>, n_obs=0, n_stacked_obs=0, n_sub_experiments=0, n_treated_units=0, n_control_units=0, kappa_pre=1, kappa_post=1, weighting='aggregate', clean_control='not_yet_treated', alpha=0.05, anticipation=0, vcov_type='hc1', cluster_name=None, n_clusters=None, survey_metadata=None)#
- Parameters:
overall_att (float)
overall_se (float)
overall_t_stat (float)
overall_p_value (float)
stacked_data (DataFrame)
n_obs (int)
n_stacked_obs (int)
n_sub_experiments (int)
n_treated_units (int)
n_control_units (int)
kappa_pre (int)
kappa_post (int)
weighting (str)
clean_control (str)
alpha (float)
anticipation (int)
vcov_type (str)
cluster_name (str | None)
n_clusters (int | None)
survey_metadata (Any | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#