In this vignette, we will assess the performance of the elastic combining estimator with a fixed threshold \(c_\gamma\). All data generating distributions are the same as in here. The following code reproduces the simulation studies in Yang et al., (2022), Section S4.5 and the plot in Figure S2.
# psi = c(0, 0, 0)
elastic_psi000_fixed_lists <- lapply(alltlocalpar, function(tlocalpar)
{
elastic_list <- sapply(1:niter, function(seed)
{
Data.list <- GenData(beta0 = c(0, 1, 1, 1), # for the mu0 function
psi0 = c(0, 0, 0), # for the contrast function
n = 1e5, mean.x = 1, # setup for the finite population
n.t = NULL, # for the RCT, use the default sample size
m = m, tlocalpar = tlocalpar, # for the RWE
seed = seed)
elasticHTE(Data.list$RT, # RCT
Data.list$RW, # RWE
thres.psi = thres.psi,
fixed = TRUE # adaptive selection strategy
)
})
class(elastic_list) <- 'res'
elastic_list
})
# psi = c(0, 1, 1)
elastic_psi011_fixed_lists <- lapply(alltlocalpar, function(tlocalpar)
{
elastic_list <- sapply(1:niter, function(seed)
{
Data.list <- GenData(beta0 = c(0, 1, 1, 1), # for the mu0 function
psi0 = c(0, 1, 1), # for the contrast function
n = 1e5, mean.x = 1, # setup for the finite population
n.t = NULL, # for the RCT, use the default sample size
m = m, tlocalpar = tlocalpar, # for the RWE
seed = seed)
elasticHTE(Data.list$RT, # RCT
Data.list$RW, # RWE
thres.psi = thres.psi,
fixed = TRUE # adaptive selection strategy
)
})
class(elastic_list) <- 'res'
elastic_list
})At last, we reproduce the summary results in Yang et al., (2022), Figure S2 as follow.