dipw.ate {dipw} | R Documentation |
Estimate the Average treatment effect E[Y(1) - Y(0)] from observational data
Description
Estimate the Average treatment effect E[Y(1) - Y(0)] from observational data
Usage
dipw.ate(
X,
Y,
W,
r1 = NULL,
r0 = NULL,
kappa = 0.5,
splitting = c("1", "3", "random"),
B = 1,
...
)
Arguments
X |
the n by p input covariance matrix |
Y |
the n dimensional observed response |
W |
the n dimensional binary vector indicating treatment assignment |
r1 |
optional n dimensional vector of an initial estimate of E[Y(1) | X_i] for i = 1, ..., n. The default is NULL |
r0 |
optional n dimensional vector of an initial estimate of E[Y(0) | X_i] for i = 1, ..., n. The default is NULL |
kappa |
the weight parameter for quadratic programming. Default is 0.5 |
splitting |
the options for splitting. "1" means B = 1 split, "3" means B = 3 splits, "random" means random splits. |
B |
the number of iterations for random splits, the default is 1. Only used when splitting is set to "random". |
... |
additional arguments that can be passed to
|
Value
tau the estimated average treatment effect
References
Wang, Y., Shah, R. D. (2020) Debiased inverse propensity score weighting for estimation of average treatment effects with high-dimensional confounders https://arxiv.org/abs/2011.08661
Examples
## Not run:
# Estimating average treatment effect with a toy data
# Notice that the external optimisation software \code{MOSEK}
# must be installed separately before running the example code.
# Without \code{MOSEK}, the example code is not executable.
# For how to install \code{MOSEK}, see documentation of \code{\link[Rmosek]{Rmosek}}.
set.seed(1)
n <- 100; p <- 200
X <- scale(matrix(rnorm(n*p), n, p))
W <- rbinom(n, 1, 1 / (1 + exp(-X[, 1])))
Y <- X[,1] + W * X[,2] + rnorm(n)
# Getting an estimate of average treatment effect
(est <- dipw.ate(X, Y, W))
## End(Not run)