Skip to contents

The coefficients of the secondary outcome are estimated on the experimental sample, where treatment is randomised, and the residual alpha = Y^S - W tau^S - X gamma^S is then formed for the observational units; the primary outcome is regressed there on treatment, covariates and that residual, and the coefficient on treatment is the selection-corrected effect. Fitting both stages on one sample makes alpha orthogonal to the design by construction, so the correction is then identically zero.

Usage

Drrct(y_obs, y_rct, D, X = NULL, G = NULL)

Arguments

y_obs

Primary outcome.

y_rct

Secondary outcome, observed in both samples.

D

Binary treatment.

X

Optional pre-treatment covariates.

G

1 for experimental rows, 0 for observational rows; NULL puts every row in both.

Value

List with estimate, tau_esc, tau_naive, correction, delta, tau_secondary, alpha_sd, n_exp, n_obs, n.

References

Athey, S., Chetty, R. and Imbens, G. W. (2020/2025). The experimental selection correction estimator. arXiv:2006.09676, equations (2.3) and (2.4), page 10.

Examples

set.seed(1)
r <- Drrct(y_obs = rnorm(10), y_rct = rnorm(10), D = rbinom(10, 1, 0.5)); TRUE
#> [1] TRUE