The Heterogeneity Test for Grouped Average Treatment Effects (GATEs) under Cross Validation in Randomized Experiments
Source:R/hetcv.test.R
hetcv.test.Rd
This function calculates statistics related to the test of heterogeneous treatment effects across groups under cross-validation.
Arguments
- T
A vector of the unit-level binary treatment receipt variable for each sample.
- tau
A vector of the unit-level continuous score. Conditional Average Treatment Effect is one possible measure.
- Y
A vector of the outcome variable of interest for each sample.
- ind
A vector of integers (between 1 and number of folds inclusive) indicating which testing set does each sample belong to.
- ngates
The number of groups to separate the data into. The groups are determined by
tau
. Default is 5.
Value
A list that contains the following items:
- stat
The estimated statistic for the test of heterogeneity under cross-validation.
- pval
The p-value of the null hypothesis (that the treatment effects are homogeneous)
References
Imai and Li (2022). “Statistical Inference for Heterogeneous Treatment Effects Discovered by Generic Machine Learning in Randomized Experiments”,
Author
Michael Lingzhi Li, Technology and Operations Management, Harvard Business School mili@hbs.edu, https://www.michaellz.com/;
Examples
T = c(1,0,1,0,1,0,1,0)
tau = matrix(c(0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,-0.5,-0.3,-0.1,0.1,0.3,0.5,0.7,0.9),nrow = 8, ncol = 2)
Y = c(4,5,0,2,4,1,-4,3)
ind = c(rep(1,4),rep(2,4))
hettestlist <- hetcv.test(T,tau,Y,ind,ngates=2)
hettestlist$stat
#> [,1]
#> [1,] 0.5752071
hettestlist$pval
#> [,1]
#> [1,] 0.7500589