Title: | Debiased Inverse Propensity Score Weighting |
---|---|
Description: | Estimation of the average treatment effect when controlling for high-dimensional confounders using debiased inverse propensity score weighting (DIPW). DIPW relies on the propensity score following a sparse logistic regression model, but the regression curves are not required to be estimable. Despite this, our package also allows the users to estimate the regression curves and take the estimated curves as input to our methods. Details of the methodology can be found in Yuhao Wang and Rajen D. Shah (2020) "Debiased Inverse Propensity Score Weighting for Estimation of Average Treatment Effects with High-Dimensional Confounders" <arXiv:2011.08661>. The package relies on the optimisation software 'MOSEK' <https://www.mosek.com/> which must be installed separately; see the documentation for 'Rmosek'. |
Authors: | Yuhao Wang [cre, aut], Rajen Shah [ctb] |
Maintainer: | Yuhao Wang <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-16 03:15:19 UTC |
Source: | https://github.com/cran/dipw |
Estimate the Average treatment effect E[Y(1) - Y(0)] from observational data
dipw.ate( X, Y, W, r1 = NULL, r0 = NULL, kappa = 0.5, splitting = c("1", "3", "random"), B = 1, ... )
dipw.ate( X, Y, W, r1 = NULL, r0 = NULL, kappa = 0.5, splitting = c("1", "3", "random"), B = 1, ... )
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
|
tau the estimated average treatment effect
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
## 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)
## 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)
Estimation of E[Y(1)] or E[Y(0)] from observational data
dipw.mean( X, Y, W, Treated = TRUE, r = NULL, kappa = 0.5, splitting = c("1", "3", "random"), B = 1, ... )
dipw.mean( X, Y, W, Treated = TRUE, r = NULL, kappa = 0.5, splitting = c("1", "3", "random"), B = 1, ... )
X |
the n by p input covariance matrix |
Y |
the n dimensional observed response |
W |
the n dimensional binary vector indicating treatment assignment |
Treated |
|
r |
optional n dimensional vector containing initial estimates of
E[Y( |
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 valid when splitting is set to "random". |
... |
additional arguments that can be passed to |
the expectation E[Y(1)] or E[Y(0)]
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
## Not run: # Estimating mean of the potential outcome 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 potential outcome mean (est <- dipw.mean(X, Y, W, Treated=TRUE)) ## End(Not run)
## Not run: # Estimating mean of the potential outcome 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 potential outcome mean (est <- dipw.mean(X, Y, W, Treated=TRUE)) ## End(Not run)