Description Usage Arguments Value Examples
Estimate the average treatment effect while adjusting for a high dimensional set of covariates
1 2 3 4 5 6 7 8 9 10 |
y |
The outcome to be analyzed |
t |
The treatment to be analyzed |
x |
An n by p matrix of covariates to adjust for |
estimators |
A list of estimators to be included in the averaging estimator. The full list of estimators is given by c("DoublePS", "DRlasso", "Debiasing", "DML", "DMLpost_selection", "TMLElasso", "TMLEscreen", "HDC", "HDbayes", "HDmatching") The HDbayes and HDC estimators are Bayesian and may take time to run on large data sets, however, the rest should run quickly. It is recommended to use as many of these estimators in the averaging as possible |
AdditionalEstimates |
A vector of additional point estimates the user can include in the averaging. This should only be used if the user has fit other estimators that are not already available in the list above, and would like to include them in the averaging. |
AdditionalSEs |
A vector of additional standard errors that correspond to the point estimates from the estimators making up AdditionalEstimates. |
trim |
An indicator of whether the averaging should remove the highest and lowest point estimates from the averaging procedure |
A list with the estimates and standard errors from each individual estimator, as well as from the averaged estimator, which combines all of the individual estimators
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | n <- 100
p <- 100
beta.c <- c(0.75,1, 0.6, -0.8, -0.7,rep(0, p-5))
gamma <- c(0.15,0.2,0, 0, -0.4, rep(0, p-5))
beta <- 1
sigma <- matrix(0.3, p,p)
diag(sigma) <- 1
x <- mvtnorm::rmvnorm(n, sigma=sigma)
t <- as.numeric((x %*% gamma + rnorm(n)) > 0)
y <- 0 + t + x %*% beta.c + rnorm(n, sd=1)
AveragingCausalHD(y=y, t=t, x=x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.