diff_diff.DCDHBootstrapResults#

class diff_diff.DCDHBootstrapResults[source]#

Bases: object

Results from ChaisemartinDHaultfoeuille (dCDH) multiplier bootstrap inference.

The bootstrap is a library extension beyond the dCDH papers, which propose only the analytical cohort-recentered plug-in variance from Web Appendix Section 3.7.3 of the dynamic companion paper. Provided for consistency with CallawaySantAnna / ImputationDiD / TwoStageDiD.

Per-target SE / CI / p-value are populated for the three scalar dCDH estimands implemented in Phase 1: overall (DID_M), joiners (DID_+), and leavers (DID_-). When a target is not available in the underlying data (e.g., no leavers), the matching fields are None.

Phase 1 per-period placebo (L_max=None) bootstrap is NOT computed. The dynamic companion paper Section 3.7.3 derives the cohort-recentered analytical variance for DID_l only, not for the per-period DID_M^pl. The placebo_se / placebo_ci / placebo_p_value fields below remain None for Phase 1. Multi-horizon placebos (L_max >= 1) have valid SE via placebo_horizon_ses - this is a library extension applying the same IF/variance structure to the placebo estimand (see REGISTRY.md dynamic placebo SE Note).

n_bootstrap#

Number of bootstrap iterations.

Type:

int

weight_type#

Type of bootstrap weights: "rademacher", "mammen", or "webb".

Type:

str

alpha#

Significance level used for confidence intervals.

Type:

float

overall_se#

Bootstrap standard error for DID_M.

Type:

float

overall_ci#

Bootstrap confidence interval for DID_M.

Type:

tuple of float

overall_p_value#

Bootstrap p-value for DID_M.

Type:

float

joiners_se#

Bootstrap SE for joiners-only DID_+ (None if no joiners).

Type:

float, optional

joiners_ci#

Bootstrap CI for joiners-only DID_+.

Type:

tuple of float, optional

joiners_p_value#

Bootstrap p-value for joiners-only DID_+.

Type:

float, optional

leavers_se#

Bootstrap SE for leavers-only DID_- (None if no leavers).

Type:

float, optional

leavers_ci#

Bootstrap CI for leavers-only DID_-.

Type:

tuple of float, optional

leavers_p_value#

Bootstrap p-value for leavers-only DID_-.

Type:

float, optional

placebo_se#

None for the Phase 1 single-period placebo (L_max=None). Multi-horizon placebo bootstrap SE is on placebo_horizon_ses.

Type:

float, optional

placebo_ci#

None for single-period placebo. See placebo_horizon_cis.

Type:

tuple of float, optional

placebo_p_value#

None for single-period placebo. See placebo_horizon_p_values.

Type:

float, optional

bootstrap_distribution#

Full bootstrap distribution of the overall DID_M estimator (shape: (n_bootstrap,)). Stored for advanced diagnostics; suppressed from __repr__.

Type:

np.ndarray, optional

Methods

__init__(n_bootstrap, weight_type, alpha, ...)

Attributes

bootstrap_distribution

cband_crit_value

event_study_cis

event_study_p_values

event_study_ses

joiners_ci

joiners_p_value

joiners_se

leavers_ci

leavers_p_value

leavers_se

path_cband_crit_values

path_cband_n_valid_horizons

path_cis

path_p_values

path_placebo_cis

path_placebo_p_values

path_placebo_ses

path_ses

placebo_ci

placebo_horizon_cis

placebo_horizon_p_values

placebo_horizon_ses

placebo_p_value

placebo_se

n_bootstrap

weight_type

alpha

overall_se

overall_ci

overall_p_value

__init__(n_bootstrap, weight_type, alpha, overall_se, overall_ci, overall_p_value, joiners_se=None, joiners_ci=None, joiners_p_value=None, leavers_se=None, leavers_ci=None, leavers_p_value=None, placebo_se=None, placebo_ci=None, placebo_p_value=None, bootstrap_distribution=None, event_study_ses=None, event_study_cis=None, event_study_p_values=None, placebo_horizon_ses=None, placebo_horizon_cis=None, placebo_horizon_p_values=None, cband_crit_value=None, path_ses=None, path_cis=None, path_p_values=None, path_placebo_ses=None, path_placebo_cis=None, path_placebo_p_values=None, path_cband_crit_values=None, path_cband_n_valid_horizons=None)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#