diff_diff.TwoStageDiDResults#
- class diff_diff.TwoStageDiDResults[source]#
Bases:
objectResults from Gardner (2022) two-stage DiD estimation.
- treatment_effects#
Per-observation treatment effects with columns: unit, time, tau_hat, weight. tau_hat is the residualized outcome y_tilde for treated observations; weight is 1/n_treated.
- Type:
pd.DataFrame
- event_study_effects#
Dictionary mapping relative time h to effect dict with keys: ‘effect’, ‘se’, ‘t_stat’, ‘p_value’, ‘conf_int’, ‘n_obs’.
- Type:
dict, optional
- bootstrap_results#
Bootstrap inference results.
- Type:
TwoStageBootstrapResults, optional
Methods
__init__(treatment_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.
to_dict()Convert headline results to a dictionary.
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__(treatment_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, event_study_effects, group_effects, groups, time_periods, n_obs, n_treated_obs, n_untreated_obs, n_treated_units, n_control_units, alpha=0.05, anticipation=0, bootstrap_results=None, survey_metadata=None, vcov_type='hc1', cluster_name=None, n_clusters=None)#
- Parameters:
treatment_effects (DataFrame)
overall_att (float)
overall_se (float)
overall_t_stat (float)
overall_p_value (float)
n_obs (int)
n_treated_obs (int)
n_untreated_obs (int)
n_treated_units (int)
n_control_units (int)
alpha (float)
anticipation (int)
bootstrap_results (TwoStageBootstrapResults | None)
survey_metadata (Any | None)
vcov_type (str)
cluster_name (str | None)
n_clusters (int | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#