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:
- y
numpy.ndarray Outcome variable array of shape (n_units,).
- post
numpy.ndarray Post-treatment period indicator array of shape (n_units,). Must contain only 0 and 1 values.
- d
numpy.ndarray Treatment group indicator array of shape (n_units,). Must contain only 0 and 1 values.
- x
numpy.ndarray Covariate matrix of shape (n_units, n_features) including intercept.
- i_weights
numpy.ndarray Individual observation weights of shape (n_units,).
- n_bootstrap
int, default=1000 Number of bootstrap iterations.
- trim_level
float, default=0.995 Trimming threshold for propensity scores. Control units with propensity scores above this level are given zero weight.
- random_state
int|numpy.random.Generator|None, default=None Controls random number generation for reproducibility.
- y
- Returns:
numpy.ndarrayBootstrap estimates of shape (n_bootstrap,) containing the standardized IPW DiD estimates for each bootstrap iteration.
See also
wboot_ipw_rcNon-standardized IPW bootstrap for repeated cross-sections.
wboot_aipw_rcBootstrap AIPW estimator for repeated cross-sections.