Doubly robust estimation of local average treatment effects with a binary instrument.
drlate estimates the local average treatment effect (LATE) and the local average treatment effect on the treated (LATT) from observational data with a binary instrument, a continuous/binary/count treatment, and a continuous/binary/count outcome. It implements the IPWRA, AIPW, IPW, and RA estimators of Słoczyński, Uysal, and Wooldridge (2022), with robust, cluster-robust, and bootstrap standard errors. It is an R port of the Stata drlate command and is validated against it to roughly 1e-8 on the SIPP example data.
Usage
library(drlate)
set.seed(1)
n <- 200
x <- rnorm(n)
z <- rbinom(n, 1, plogis(0.3 * x)) # binary instrument
d <- rbinom(n, 1, plogis(-0.2 + 0.8 * z + 0.3 * x)) # treatment
y <- 1 + 0.5 * d + 0.4 * x + rnorm(n) # outcome
dat <- data.frame(y, d, z, x)
# Default: doubly robust IPWRA LATE
drlate(y ~ x, d ~ x, z ~ x, data = dat)
# AIPW with inverse-probability-tilting PS; LATT; bootstrap SEs
drlate(y ~ x, d ~ x, z ~ x, data = dat, method = "aipw", ps = "ipt")
drlate(y ~ x, d ~ x, z ~ x, data = dat, estimand = "latt")
drlate(y ~ x, d ~ x, z ~ x, data = dat, vce = "bootstrap", boot_reps = 200)The three formulas give, in order, the outcome model, the treatment model, and the instrument propensity-score model. Methods are print/summary/coef/ vcov/nobs/broom::tidy.
Documentation
Full documentation: https://xiangao.github.io/drlate/
- Doubly robust LATE and LATT with drlate — worked vignette reproducing the Stata help-file examples on the SIPP data, with the matching Stata reference numbers.
-
drlate()— the estimation function. - Reference index — all functions on one page.
Reference
Słoczyński, T., Uysal, S. D., and Wooldridge, J. M. (2022). Doubly Robust Estimation of Local Average Treatment Effects Using Inverse Probability Weighted Regression Adjustment. arXiv:2208.01300. https://doi.org/10.48550/arXiv.2208.01300