Provides various statistical methods for evaluating heterogeneous treatment effects (HTE) in randomized experiments. The package includes tools to estimate uniform confidence bands for estimation of the group average treatment effect sorted by generic machine learning algorithms (GATES). It also provides the tools to identify a subgroup of individuals who are likely to benefit from a treatment the most "exceptional responders" or those who are harmed by it. Detailed reference in Imai and Li (2023)
evalHTE evaluates heterogeneous treatment effects in randomized experiments.
Fixed-group inference uses evalITR; URATE() provides the revised uniform
bands for ranked subgroups described in Imai and Li.
library(evalHTE)
set.seed(91)
n <- 120
score <- rnorm(n)
D <- sample(rep(0:1, each = n/2))
Y <- rnorm(n) + D*(1+score)
band <- URATE(D, score, Y, alpha = .1, L = 1000, seed = 801)
k <- band$selected
c(proportion = band$p[k], estimate = band$rate[k], lower = band$lower[k])
plot_CI(band)
Use a prespecified score or one fitted on independent training data. The band conditions on that fitted rule under independent sampling and complete randomization. Coverage is simultaneous over subgroup sizes within one model and outcome, allowing the size to maximize the uniform lower bound. It does not adjust for selecting among models. Cross-validation remains available for fixed-group inference but not for uniform subgroup bands.
URATE(D, tau, Y) still returns rate and sd. It now also returns calibrated
bounds and the selected subgroup index. side="upper" or "two.sided" changes
the calibration. D=NULL evaluates covariate means, and
adjustment="difference" subtracts the overall mean. Exact ties are ordered
randomly without altering strict score comparisons. Simulation seeds are local
to each call, and plots do not write files.
For the model-fitting workflow, use estimate_hte(..., split_ratio=.4) followed
by evaluate_hte(fit, alpha=.1, L=50000, seed=801). summary() and plot_CI()
use the same stored band. See vignette("uniform-bands", package="evalHTE") for
assumptions, interpretation, and reproduction settings.
install.packages("evalHTE")
This source revision introduces compiled Gaussian calibration using Rcpp. Installing from source requires the standard R compilation tools. Binary packages do not require a compiler at use time.