diff_diff.StaggeredTripleDiffResults#

class diff_diff.StaggeredTripleDiffResults[source]#

Bases: object

Results from Staggered Triple Difference (DDD) estimation.

Implements the Ortiz-Villavicencio & Sant’Anna (2025) estimator for staggered adoption settings with an eligibility dimension.

group_time_effects#

Dictionary mapping (group, time) tuples to effect dictionaries.

Type:

dict

overall_att#

Overall average treatment effect (weighted average of ATT(g,t)).

Type:

float

overall_se#

Standard error of overall ATT.

Type:

float

overall_t_stat#

T-statistic for overall ATT.

Type:

float

overall_p_value#

P-value for overall ATT.

Type:

float

overall_conf_int#

Confidence interval for overall ATT.

Type:

tuple

groups#

List of enabling cohorts (first treatment periods).

Type:

list

time_periods#

List of all time periods.

Type:

list

n_obs#

Total number of observations.

Type:

int

n_treated_units#

Number of treated units (S < inf AND Q = 1).

Type:

int

n_control_units#

Number of units not in treated group.

Type:

int

n_never_enabled#

Number of never-enabled units (S = inf or 0).

Type:

int

n_eligible#

Number of eligible units (Q = 1).

Type:

int

n_ineligible#

Number of ineligible units (Q = 0).

Type:

int

overall_att_es#

Paper Eq. (4.14) “overall” ATT: the unweighted mean of the post-treatment event-study effects ES(e). Populated only when aggregate is "event_study" or "all"; None otherwise. Distinct from overall_att (the Callaway-Sant’Anna simple post-treatment (g,t) average, which is the default headline ATT).

Type:

float, optional

overall_se_es, overall_t_stat_es, overall_p_value_es, overall_conf_int_es

Standard error, t-statistic, p-value, and confidence interval for overall_att_es; None when overall_att_es is None.

Type:

optional

Methods

__init__(group_time_effects, overall_att, ...)

epv_summary([show_all])

Return per-cohort EPV diagnostics as a DataFrame.

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 dictionary.

Attributes

alpha

anticipation

att

base_period

bootstrap_results

cband_crit_value

coef_var

SE / abs(overall ATT).

comparison_group_counts

conf_int

control_group

epv_diagnostics

epv_threshold

estimation_method

event_study_effects

gmm_weights

group_effects

influence_functions

is_significant

Check if overall ATT is significant.

overall_att_es

overall_conf_int_es

overall_p_value_es

overall_se_es

overall_t_stat_es

p_value

pscore_fallback

pscore_trim

se

significance_stars

Significance stars for overall ATT.

survey_metadata

t_stat

group_time_effects

overall_att

overall_se

overall_t_stat

overall_p_value

overall_conf_int

groups

time_periods

n_obs

n_treated_units

n_control_units

n_never_enabled

n_eligible

n_ineligible

__init__(group_time_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, groups, time_periods, n_obs, n_treated_units, n_control_units, n_never_enabled, n_eligible, n_ineligible, alpha=0.05, control_group='notyettreated', base_period='varying', anticipation=0, estimation_method='dr', event_study_effects=None, group_effects=None, influence_functions=None, bootstrap_results=None, cband_crit_value=None, pscore_trim=0.01, survey_metadata=None, comparison_group_counts=None, gmm_weights=None, epv_diagnostics=None, epv_threshold=10, pscore_fallback='error', overall_att_es=None, overall_se_es=None, overall_t_stat_es=None, overall_p_value_es=None, overall_conf_int_es=None)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#