diff_diff.RegressionDiscontinuityResults#
- class diff_diff.RegressionDiscontinuityResults[source]#
Bases:
BaseResultsResults of a regression discontinuity fit (sharp or fuzzy; the
estimandfield names which one, andfirst_stage*fields are populated on fuzzy fits only).Canonical inference fields (
att,se,t_stat,p_value,conf_int) all describe the ROBUST bias-corrected row:attis the bias-corrected point estimate andconf_intis centered on it (see module docstring for the binding rationale and the deviation from rdrobust’s printed headline). The conventional row is exposed as explicit*_conventionalfields. The (rarely used) middle “Bias-Corrected” row shares its coefficient withatt(both aretau_bc) and its standard error withse_conventional- only its inference triple carries the*_bias_correctedsuffix (t_stat_bias_corrected,p_value_bias_corrected,conf_int_bias_corrected); there are deliberately no redundantatt_bias_corrected/se_bias_correctedfields. Together the three rows mirror rdrobust’s output exactly.Methods
__init__(att, se, t_stat, p_value, conf_int, ...)print_summary()summary()Human-readable summary with the three-row rdrobust table.
to_dataframe()to_dict()Flat scalar dict; confidence intervals split into lower/upper.
Attributes
beta_p_leftbeta_p_rightbeta_t_p_leftbeta_t_p_rightcovariate_coefficientscovariatescovariates_droppedfirst_stagefirst_stage_conf_intfirst_stage_conf_int_bias_correctedfirst_stage_conf_int_conventionalfirst_stage_conventionalfirst_stage_covariate_coefficientsfirst_stage_p_valuefirst_stage_p_value_bias_correctedfirst_stage_p_value_conventionalfirst_stage_sefirst_stage_se_conventionalfirst_stage_t_statfirst_stage_t_stat_bias_correctedfirst_stage_t_stat_conventionalattset_statp_valueconf_intalphaatt_conventionalse_conventionalt_stat_conventionalp_value_conventionalconf_int_conventionalt_stat_bias_correctedp_value_bias_correctedconf_int_bias_correctedse_robusth_lefth_rightb_leftb_rightn_obsn_leftn_rightn_h_leftn_h_rightn_b_leftn_b_rightn_unique_leftn_unique_rightn_droppedcutoffpqkernelbwselectvcov_typennmatchmasspointsbwcheckbwrestrictscaleregulh_inputb_inputrho_inputestimandsharpbwtreatment_colcovs_drop- __init__(att, se, t_stat, p_value, conf_int, alpha, att_conventional, se_conventional, t_stat_conventional, p_value_conventional, conf_int_conventional, t_stat_bias_corrected, p_value_bias_corrected, conf_int_bias_corrected, se_robust, h_left, h_right, b_left, b_right, n_obs, n_left, n_right, n_h_left, n_h_right, n_b_left, n_b_right, n_unique_left, n_unique_right, n_dropped, cutoff, p, q, kernel, bwselect, vcov_type, nnmatch, masspoints, bwcheck, bwrestrict, scaleregul, h_input, b_input, rho_input, estimand, sharpbw, treatment_col, covs_drop, first_stage=None, first_stage_se=None, first_stage_t_stat=None, first_stage_p_value=None, first_stage_conf_int=None, first_stage_conventional=None, first_stage_se_conventional=None, first_stage_t_stat_conventional=None, first_stage_p_value_conventional=None, first_stage_conf_int_conventional=None, first_stage_t_stat_bias_corrected=None, first_stage_p_value_bias_corrected=None, first_stage_conf_int_bias_corrected=None, covariates=None, covariates_dropped=None, covariate_coefficients=None, first_stage_covariate_coefficients=None, beta_p_left=None, beta_p_right=None, beta_t_p_left=None, beta_t_p_right=None)#
- Parameters:
att (float)
se (float)
t_stat (float)
p_value (float)
alpha (float)
att_conventional (float)
se_conventional (float)
t_stat_conventional (float)
p_value_conventional (float)
t_stat_bias_corrected (float)
p_value_bias_corrected (float)
se_robust (float)
h_left (float)
h_right (float)
b_left (float)
b_right (float)
n_obs (int)
n_left (int)
n_right (int)
n_h_left (int)
n_h_right (int)
n_b_left (int)
n_b_right (int)
n_unique_left (int)
n_unique_right (int)
n_dropped (int)
cutoff (float)
p (int)
q (int)
kernel (str)
bwselect (str)
vcov_type (str)
nnmatch (int)
masspoints (str)
bwcheck (int | None)
bwrestrict (bool)
scaleregul (float)
h_input (float | None)
b_input (float | None)
rho_input (float | None)
estimand (str)
sharpbw (bool)
treatment_col (str | None)
covs_drop (bool)
first_stage (float | None)
first_stage_se (float | None)
first_stage_t_stat (float | None)
first_stage_p_value (float | None)
first_stage_conventional (float | None)
first_stage_se_conventional (float | None)
first_stage_t_stat_conventional (float | None)
first_stage_p_value_conventional (float | None)
first_stage_conf_int_conventional (Tuple[float, float] | None)
first_stage_t_stat_bias_corrected (float | None)
first_stage_p_value_bias_corrected (float | None)
first_stage_conf_int_bias_corrected (Tuple[float, float] | None)
first_stage_covariate_coefficients (Dict[str, float] | None)
beta_p_left (ndarray)
beta_p_right (ndarray)
beta_t_p_left (ndarray | None)
beta_t_p_right (ndarray | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#