Native cross-fitting estimator using ridge regression, following Chernozhukov et al. (2018). Cross-validated against DoubleML in the package's cross tests but not calling it at runtime; or, last-ditch, OLS partialling out.
Examples
# \donttest{
set.seed(1)
n <- 200
X <- matrix(rnorm(n * 2), n, 2)
tr <- rbinom(n, 1, plogis(X[, 1]))
y <- 2 * tr + X[, 1] + rnorm(n)
df <- data.frame(y = y, d = tr, x1 = X[, 1], x2 = X[, 2])
res <- suppressWarnings(estimate_plr(df,
treatment = "d", outcome = "y",
covariates = c("x1", "x2")
))
res$ate
#> [1] 2.063619
# }
