diff_diff.CallawaySantAnnaResults#

class diff_diff.CallawaySantAnnaResults[source]#

Bases: object

Results from Callaway-Sant’Anna (2021) staggered DiD estimation.

This class stores group-time average treatment effects ATT(g,t) and provides methods for aggregation into summary measures.

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_p_value#

P-value for overall ATT.

Type:

float

overall_conf_int#

Confidence interval for overall ATT.

Type:

tuple

groups#

List of treatment 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 ever-treated units.

Type:

int

n_control_units#

Number of never-treated units (excludes not-yet-treated dynamic controls).

Type:

int

event_study_effects#

Effects aggregated by relative time (event study).

Type:

dict, optional

group_effects#

Effects aggregated by treatment cohort.

Type:

dict, optional

pscore_trim#

Propensity score trimming bound used during estimation.

Type:

float

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.

Attributes

alpha

anticipation

att

base_period

bootstrap_results

cband_crit_value

coef_var

SE / abs(overall ATT).

conf_int

control_group

epv_diagnostics

epv_threshold

event_study_effects

event_study_vcov

event_study_vcov_index

group_effects

influence_functions

is_significant

Check if overall ATT is significant.

p_value

panel

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

__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, alpha=0.05, control_group='never_treated', base_period='varying', anticipation=0, panel=True, event_study_effects=None, group_effects=None, influence_functions=None, event_study_vcov=None, event_study_vcov_index=None, bootstrap_results=None, cband_crit_value=None, pscore_trim=0.01, survey_metadata=None, epv_diagnostics=None, epv_threshold=10, pscore_fallback='error')#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#