diff_diff.ImputationDiDResults#
- class diff_diff.ImputationDiDResults[source]#
Bases:
objectResults from Borusyak-Jaravel-Spiess (2024) imputation DiD estimation.
- treatment_effects#
Unit-level treatment effects with columns: unit, time, tau_hat, weight.
- 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:
ImputationBootstrapResults, optional
Methods
__init__(treatment_effects, overall_att, ...)pretrend_test([n_leads])Run a pre-trend test (Equation 9 of Borusyak et al. 2024).
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 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, pretrend_results=None, bootstrap_results=None, _estimator_ref=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 (ImputationBootstrapResults | None)
_estimator_ref (Any | None)
survey_metadata (Any | None)
vcov_type (str)
cluster_name (str | None)
n_clusters (int | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#