diff_diff.SunAbrahamResults#

class diff_diff.SunAbrahamResults[source]#

Bases: BaseResults

Results from Sun-Abraham (2021) interaction-weighted estimation.

event_study_effects#

Dictionary mapping relative time to effect dictionaries with keys: ‘effect’, ‘se’, ‘t_stat’, ‘p_value’, ‘conf_int’, ‘n_groups’.

Type:

dict

event_study_df#

Per-relative-time inference degrees-of-freedom PROVENANCE: the df each stored event-study row’s safe_inference actually received. Under vcov_type="hc2_bm" this is that event time’s own Bell-McCaffrey contrast DOF; under a survey design it is the design df (post-drop when replicates were dropped by the refit); it is NaN where inference was normal-theory or where a non-finite BM DOF made the row’s inference undefined. None under bootstrap, whose percentile p-values/CIs never used a df - a narrower clearing rule than event_study_vcov, which also clears under replicate refits (whose rows DID use a genuine df).

Type:

dict, optional

overall_att#

Overall average treatment effect (weighted average of post-treatment effects).

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

cohort_weights#

Dictionary mapping relative time to cohort weight dictionaries.

Type:

dict

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.

Type:

int

alpha#

Significance level used for confidence intervals.

Type:

float

control_group#

Type of control group used.

Type:

str

vcov_type#

Variance-covariance family from the fit-time configuration (classical, hc1, hc2, hc2_bm, or conley). On the "conley" (spatial-HAC) path, conley_lag_cutoff and cluster_name are populated. Note: when a survey_design= is supplied, the survey-design Taylor Series Linearization (or replicate-weight refit) variance overrides this analytical family — the field still records the configured value but survey_metadata indicates the survey path was active. Likewise, on bootstrap fits (n_bootstrap > 0) the SE comes from the pairs bootstrap (or Rao-Wu rescaled bootstrap under stratified / PSU survey designs), not the analytical family.

Type:

str

Methods

__init__(event_study_effects, overall_att, ...)

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 headline results to a dictionary.

Attributes

alpha

anticipation

att

bootstrap_results

cluster_name

coef_var

SE / abs(overall ATT).

cohort_effects

conf_int

conley_lag_cutoff

control_group

df_convention

The estimator's df_convention configuration echoed onto the results ("residual" | "cluster" | "normal"; added 3.9).

event_study_df

event_study_vcov

event_study_vcov_index

inference_df

The df the stored overall-ATT p-value/CI's safe_inference actually received: the BM contrast df under hc2_bm, the survey design df on survey fits, else the df_convention-resolved analytical fallback (None under "normal" = normal theory).

is_significant

Check if overall ATT is significant.

p_value

reference_observed

reference_period

se

significance_stars

Significance stars for overall ATT.

survey_metadata

t_stat

vcov_type

event_study_effects

overall_att

overall_se

overall_t_stat

overall_p_value

overall_conf_int

cohort_weights

groups

time_periods

n_obs

n_treated_units

n_control_units

__init__(event_study_effects, overall_att, overall_se, overall_t_stat, overall_p_value, overall_conf_int, cohort_weights, groups, time_periods, n_obs, n_treated_units, n_control_units, alpha=0.05, control_group='never_treated', vcov_type='hc1', anticipation=0, bootstrap_results=None, cohort_effects=None, survey_metadata=None, event_study_vcov=None, event_study_vcov_index=None, conley_lag_cutoff=None, cluster_name=None, reference_period=None, reference_observed=False, event_study_df=None, df_convention=None, inference_df=None)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#