diff_diff.wooldridge_results.WooldridgeDiDResults#
- class diff_diff.wooldridge_results.WooldridgeDiDResults[source]#
Bases:
objectResults from WooldridgeDiD.fit().
Core output is
group_time_effects: a dict keyed by (cohort_g, time_t) with per-cell ATT estimates and inference. Call.aggregate(type, weights=...)to compute any of the fourjwdid_estataggregation types under either the default cell-count weighting (weights="cell", matches Statajwdid_estat) or the paper W2025 opt-in cohort-share weighting (weights="cohort_share", Eqs. 7.4 / 7.6; restricted totype ∈ {"simple", "event"}).cohort_trend_coefscarries Section 8 / Eq. 8.1 estimatedδ_gslopes when the fit was produced underWooldridgeDiD(cohort_trends=True).aggregation_weightsis keyed by aggregation type and records the active weighting scheme that wrote to each cached surface (surfaced insummary()/to_dataframe()/__repr__).Methods
__init__(group_time_effects, overall_att, ...)aggregate(type[, weights])Compute and store one of the four jwdid_estat aggregation types.
plot_event_study([weights])Event study plot.
summary([aggregation])Print formatted summary table.
to_dataframe([aggregation])Export aggregated effects to a DataFrame.
Attributes
alphaanticipationattcalendar_effectscluster_namecohort_trendsconf_intconley_lag_cutoffcontrol_groupevent_study_effectsgroup_effectsmethodn_clustersn_control_unitsn_obsn_treated_unitsp_valuesesurvey_metadatat_statvcov_typegroup_time_effectskey=(g,t), value={att, se, t_stat, p_value, conf_int}
overall_attoverall_seoverall_t_statoverall_p_valueoverall_conf_intgroupstime_periodscohort_trend_coefsaggregation_weights- __init__(group_time_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, group_effects=None, calendar_effects=None, event_study_effects=None, method='ols', control_group='not_yet_treated', groups=<factory>, time_periods=<factory>, n_obs=0, n_treated_units=0, n_control_units=0, alpha=0.05, anticipation=0, survey_metadata=None, vcov_type='hc1', cluster_name=None, n_clusters=None, conley_lag_cutoff=None, cohort_trend_coefs=<factory>, _bootstrap_used=False, cohort_trends=False, aggregation_weights=<factory>, _gt_weights=<factory>, _n_g_per_cohort=<factory>, _gt_vcov=None, _gt_keys=<factory>, _df_survey=None, _bm_per_cell_dof=<factory>, _bm_artifacts=None, _df_one_way=None)#
- Parameters:
overall_att (float)
overall_se (float)
overall_t_stat (float)
overall_p_value (float)
method (str)
control_group (str)
n_obs (int)
n_treated_units (int)
n_control_units (int)
alpha (float)
anticipation (int)
survey_metadata (Any | None)
vcov_type (str)
cluster_name (str | None)
n_clusters (int | None)
conley_lag_cutoff (int | None)
_bootstrap_used (bool)
cohort_trends (bool)
_gt_vcov (ndarray | None)
_df_survey (int | None)
_bm_artifacts (Tuple[ndarray, ndarray, ndarray, Dict[Tuple[Any, Any], int]] | None)
_df_one_way (float | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#