diff_diff.wooldridge_results.WooldridgeDiDResults#

class diff_diff.wooldridge_results.WooldridgeDiDResults[source]#

Bases: object

Results 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 four jwdid_estat aggregation types under either the default cell-count weighting (weights="cell", matches Stata jwdid_estat) or the paper W2025 opt-in cohort-share weighting (weights="cohort_share", Eqs. 7.4 / 7.6; restricted to type {"simple", "event"}). cohort_trend_coefs carries Section 8 / Eq. 8.1 estimated δ_g slopes when the fit was produced under WooldridgeDiD(cohort_trends=True). aggregation_weights is keyed by aggregation type and records the active weighting scheme that wrote to each cached surface (surfaced in summary() / 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

alpha

anticipation

att

calendar_effects

cluster_name

cohort_trends

conf_int

conley_lag_cutoff

control_group

event_study_effects

group_effects

method

n_clusters

n_control_units

n_obs

n_treated_units

p_value

se

survey_metadata

t_stat

vcov_type

group_time_effects

key=(g,t), value={att, se, t_stat, p_value, conf_int}

overall_att

overall_se

overall_t_stat

overall_p_value

overall_conf_int

groups

time_periods

cohort_trend_coefs

aggregation_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:
Return type:

None

classmethod __new__(*args, **kwargs)#