moderndid.aipw_did_rc_imp1#

moderndid.aipw_did_rc_imp1(y, post, d, ps, out_reg, i_weights, trim_ps=None)[source]#

Compute the simplified AIPW estimator for repeated cross-section data.

For repeated cross-section settings (where different units are observed in pre and post periods), this improved estimator provides a doubly robust approach that combines inverse propensity weighting with outcome regression. It only requires modeling the outcomes for control units and does not model outcomes for the treated group. The estimator is given by equation (3.9) in [1] as

\[\widehat{\tau}_{1,imp}^{dr,rc} = \mathbb{E}_{n}\left[\left(\widehat{w}_{1}^{rc}(D,T) - \widehat{w}_{0}^{rc}(D,T,X;\widehat{\gamma}^{ipt})\right) (Y - \mu_{0,Y}^{lin,rc}(X;\widehat{\beta}_{0,1}^{wls,rc}, \widehat{\beta}_{0,0}^{wls,rc}))\right],\]

where the weights \(\widehat{w}\) are functions of the treatment status \(D\) and time period \(T\), and \(\mu_{0,Y}^{lin,rc}\) is the predicted outcome for the control group from a weighted least squares regression. This estimator is doubly robust but not locally efficient.

Parameters:
ynumpy.ndarray

A 1D array representing the outcome variable for each unit.

postnumpy.ndarray

A 1D array representing the post-treatment period indicator (1 for post, 0 for pre) for each unit.

dnumpy.ndarray

A 1D array representing the treatment indicator (1 for treated, 0 for control) for each unit.

psnumpy.ndarray

A 1D array of propensity scores (estimated probability of being treated, \(P(D=1|X)\)) for each unit.

out_regnumpy.ndarray

A 1D array of predicted outcomes from a single outcome regression model for each unit.

i_weightsnumpy.ndarray

A 1D array of individual observation weights for each unit.

trim_psnumpy.ndarray

A 1D array used for trimming observations based on propensity scores.

Returns:
float

The simplified AIPW ATT estimate for repeated cross-sections.

See also

aipw_did_rc_imp2

Locally efficient AIPW estimator for repeated cross-sections.

aipw_did_panel

AIPW estimator for panel data.

References

[1]

Sant’Anna, P. H., & Zhao, J. (2020). Doubly robust difference-in-differences estimators. Journal of Econometrics, 219(1), 101-122. https://doi.org/10.1016/j.jeconom.2020.06.003 arXiv preprint: https://arxiv.org/abs/1812.01723