diff_diff.TripleDifferenceResults#

class diff_diff.TripleDifferenceResults[source]#

Bases: object

Results from Triple Difference (DDD) estimation.

Provides access to the estimated average treatment effect on the treated (ATT), standard errors, confidence intervals, and diagnostic information.

att#

Average Treatment effect on the Treated (ATT). This is the effect on units in the treated group (G=1) and eligible partition (P=1) after treatment (T=1).

Type:

float

se#

Standard error of the ATT estimate.

Type:

float

t_stat#

T-statistic for the ATT estimate.

Type:

float

p_value#

P-value for the null hypothesis that ATT = 0.

Type:

float

conf_int#

Confidence interval for the ATT.

Type:

tuple[float, float]

n_obs#

Total number of observations used in estimation.

Type:

int

n_treated_eligible#

Number of observations in treated group and eligible partition.

Type:

int

n_treated_ineligible#

Number of observations in treated group and ineligible partition.

Type:

int

n_control_eligible#

Number of observations in control group and eligible partition.

Type:

int

n_control_ineligible#

Number of observations in control group and ineligible partition.

Type:

int

estimation_method#

Estimation method used: “dr” (doubly robust), “reg” (regression adjustment), or “ipw” (inverse probability weighting).

Type:

str

alpha#

Significance level used for confidence intervals.

Type:

float

Methods

__init__(att, se, t_stat, p_value, conf_int, ...)

epv_summary([show_all])

Return per-subgroup EPV diagnostics as a DataFrame.

print_summary([alpha])

Print the summary to stdout.

summary([alpha])

Generate a formatted summary of the estimation results.

to_dataframe()

Convert results to a pandas DataFrame.

to_dict()

Convert results to a dictionary.

Attributes

alpha

cluster_name

covariate_balance

epv_diagnostics

epv_threshold

group_means

inference_method

is_significant

Check if the ATT is statistically significant at the alpha level.

n_bootstrap

n_clusters

pscore_fallback

pscore_stats

r_squared

significance_stars

Return significance stars based on p-value.

survey_metadata

vcov_type

att

se

t_stat

p_value

conf_int

n_obs

n_treated_eligible

n_treated_ineligible

n_control_eligible

n_control_ineligible

estimation_method

__init__(att, se, t_stat, p_value, conf_int, n_obs, n_treated_eligible, n_treated_ineligible, n_control_eligible, n_control_ineligible, estimation_method, alpha=0.05, group_means=None, pscore_stats=None, r_squared=None, covariate_balance=None, inference_method='analytical', vcov_type='hc1', cluster_name=None, n_bootstrap=None, n_clusters=None, survey_metadata=None, epv_diagnostics=None, epv_threshold=10, pscore_fallback='error')#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#