View source: R/fun_estimate_mean_treat.R
fit.treat.adj2.adj2c.Random | R Documentation |
Implements the (HOIF-inspired) debiased estimators for treatment effect on the treatment/control arm with variance estimation using asymptotic-variance. Designed for randomized experiments with moderately high-dimensional covariates.
fit.treat.adj2.adj2c.Random(Y, X, A, pi1_hat = NULL)
Y |
Numeric vector of length n containing observed responses. |
X |
Numeric matrix (n x p) of covariates. Centering is required. Intercept term can include or not. |
A |
Binary vector of length n indicating treatment assignment (1 = treatment, 0 = control). |
pi1_hat |
Default is NULL. The assignment probability for the simple randomization. |
A list containing three named vectors, including point estimates and variance estimates:
Point estimates:
adj2
: Point estimation of the HOIF-inspired debiased estimator given by Zhao et al.(2024).
adj2c
: Point estimation of the debiased estimator given by Lu et al. (2023), which is also the HOIF-inspired debiased estimator given by Zhao et al.(2024).
Variance estimates for adj2 and adj2c, with formulas inspired by Lu et al. (2023).:
adj2
: Variance for adj2
.
adj2c
: Variance for adj2c
.
Variance estimates for adj2 and adj2c, with formulas given in Zhao et al. (2024), which is more conservative.
adj2
: Variance for adj2
.
adj2c
: Variance for adj2c
.
Lu, X., Yang, F. and Wang, Y. (2023) Debiased regression adjustment in completely randomized experiments with moderately high-dimensional covariates. arXiv preprint, arXiv:2309.02073, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2309.02073")}.
Zhao, S., Wang, X., Liu, L. and Zhang, X. (2024) Covariate Adjustment in Randomized Experiments Motivated by Higher-Order Influence Functions. arXiv preprint, arXiv:2411.08491, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2411.08491")}.
set.seed(100)
n <- 500
p <- n * 0.3
beta <- runif(p, -1 / sqrt(p), 1 / sqrt(p))
X <- mvtnorm::rmvt(n, sigma = diag(1, p), df = 3)
Y1 <- as.numeric(X %*% beta)
Y0 <- as.numeric(X %*% beta - 1)
pi1 <- 2/3
n1 <- ceiling(n * pi1)
ind <- sample(n, size = n1)
A <- rep(0, n)
A[ind] <- 1
Y <- Y1 * A + Y0 * (1 - A)
Xc <- cbind(1, scale(X, scale = FALSE))
result.adj2.adj2c.random.ls <- fit.treat.adj2.adj2c.Random(Y, Xc, A)
point_est <- result.adj2.adj2c.random.ls$tau_vec
var_est_v1 <- result.adj2.adj2c.random.ls$var_vec_v1
var_est_v2 <- result.adj2.adj2c.random.ls$var_vec_v2
point_est
var_est_v1
var_est_v2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.