moderndid.wboot_std_ipw_rc#

moderndid.wboot_std_ipw_rc(y, post, d, x, i_weights, n_bootstrap=1000, trim_level=0.995, random_state=None)[source]#

Compute bootstrap standardized IPW DiD estimator for repeated cross-sections.

Implements the bootstrap procedure for computing standardized inverse probability weighted (IPW) difference-in-differences estimates with repeated cross-sectional data. The standardized IPW estimator normalizes the weighted outcomes by the sum of weights within each group-period cell.

Parameters:
ynumpy.ndarray

Outcome variable array of shape (n_units,).

postnumpy.ndarray

Post-treatment period indicator array of shape (n_units,). Must contain only 0 and 1 values.

dnumpy.ndarray

Treatment group indicator array of shape (n_units,). Must contain only 0 and 1 values.

xnumpy.ndarray

Covariate matrix of shape (n_units, n_features) including intercept.

i_weightsnumpy.ndarray

Individual observation weights of shape (n_units,).

n_bootstrapint, default=1000

Number of bootstrap iterations.

trim_levelfloat, default=0.995

Trimming threshold for propensity scores. Control units with propensity scores above this level are given zero weight.

random_stateint | numpy.random.Generator | None, default=None

Controls random number generation for reproducibility.

Returns:
numpy.ndarray

Bootstrap estimates of shape (n_bootstrap,) containing the standardized IPW DiD estimates for each bootstrap iteration.

See also

wboot_ipw_rc

Non-standardized IPW bootstrap for repeated cross-sections.

wboot_aipw_rc

Bootstrap AIPW estimator for repeated cross-sections.