README.md

debiased.subgroup

To install this package in R, run the following commands:

library(devtools) 
install_github("WaverlyWei/debiased.subgroup")

This package implements bootstrap-assisted desparsified Lasso and bootstrap-assisted R-split estimators on selected subgroup's treatment effect estimation. The implemented estimators remove the subgroup selection bias and the regularization bias induced by high-dimensional covariates.

The optimal tuning parameter for each method are selected via cross-validation:

Example usage:

library(debiased.subgroup)
p <- 200
n <- 100 
ngroups <- 2 
s0 <- 4
m <- ngroups
Sigma <- matrix(0,p,p)
for (i in 1:n){
      for(j in 1:p){
        Sigma[i,j] <- 0.5^(abs(i-j))}
}

X <- mvrnorm( n = n, mu = rep(0,p), Sigma = Sigma )
Z <- matrix(0,n,m)
for(i in 1:n){
      for(j in 1:m){
        Z[i,j] <- rbinom(1,1,exp(X[i,2*j-1]   +X[i,2*j])/(1+exp(X[i,2*j-1]+ X[i,2*j])))}
}
noise.y <- 1
betas <- 1
w.index <- seq(1, m, 1) 
x <- cbind(Z,X)

beta <- c(rep(0,m-1),betas) 
gamma <- c(rep(1, s0), rep(0, p-s0)) 
noise <- mvrnorm( n = 1, mu = rep(0,n), Sigma = diag(n) * noise.y )

Y <- 0.5 + x %*% beta0 + noise
r <- 1/(3*1:10)

desparse_res <- BSDesparseLasso(y = Y,
                                x = x, 
                                r = r, 
                                G = w.index,
                                B = 5)
desparse_res

rsplit_res <- BSSplitLasso(y = Y,
                           x = x, 
                           r = r, 
                           G = w.index,
                           B = 5, BB = 10)
rsplit_res                     

References



WaverlyWei/debiased.subgroup documentation built on Jan. 27, 2021, 12:15 a.m.