| hte_test_conditional | R Documentation |
For binary treatment T, covariates Z and outcome Y, it tests
the hypothesis
H_0^c(S): \tau(Z) \text{ only depends on } Z \text{ through } Z_{S^c},
where S is a subset of covariates and \tau(Z)=\mathbb{E}[Y | T=1, Z] - \mathbb{E}[Y | T=0, Z]
is the CATE. When S is the full set, this amounts to testing \tau(Z)
is a constant; when S is a proper subset, this amounts to testing Z_S
has no further effect modification while holding Z_{S^c} fixed.
hte_test_conditional(
y,
Tr,
Z,
S = 1:ncol(Z),
hunt.style = "optimal",
folds.crossfit = 5,
trim.outlier.hunt = TRUE,
splits = c(0.5, 0.5),
arg.hunt_grf = list(honesty = FALSE, tune.parameters = "all"),
verbose = FALSE,
randomized = FALSE
)
y |
Numeric response vector of length n. |
Tr |
Binary (0/1) treatment vector of length n. |
Z |
Numeric covariate matrix of dimension n x p. |
S |
A subset of |
hunt.style |
One of |
folds.crossfit |
Number of cross-fitting folds passed to
|
trim.outlier.hunt, splits, verbose |
Passed through to
|
arg.hunt_grf |
Arguments passed to |
randomized |
If |
An object of class "dScoreTest": a list whose key elements
are the debiased test statistic t.stat and the one-sided p-value
p.val (right tail of the standard normal), along with the test-set
score residuals, the hunted direction, and the call. It has
print,
summary and
plot methods.
Dhawan, A., Guo, F. R. and Shah, R. D. (2026). The debiased score test: hunt-and-test for semiparametric hypotheses. arXiv:2607.28861. https://arxiv.org/abs/2607.28861
fit_CATE, dScoreTest
set.seed(1)
n <- 600
Z <- matrix(rnorm(n * 3), n, 3)
Tr <- rbinom(n, 1, plogis(Z[, 1]))
y <- Z[, 2] + Z[, 3] + Tr * (1 + Z[, 1]) + rnorm(n) # CATE varies with Z1
# allow modification by Z1 (S = {2,3}): well-specified, should not reject
hte_test_conditional(y, Tr, Z, S = c(2, 3))
# forbid all modification (constant CATE): misspecified, should reject
hte_test_conditional(y, Tr, Z, S = 1:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.