View source: R/kija_rate_omnibus_test.R
RATEOmnibusTest | R Documentation |
Provides the P-value for a formal test of heterogeneity based on the RATE statistic by Yadlowsky et al.
RATEOmnibusTest(forest, ...)
## S3 method for class 'causal_forest'
RATEOmnibusTest(
forest,
level = 0.95,
target = c("AUTOC", "QINI"),
q = seq(0.1, 1, 0.1),
R = 500,
num.threads = 1,
seed = NULL,
honesty = TRUE,
stabilize.splits = TRUE,
...
)
## S3 method for class 'causal_survival_forest'
RATEOmnibusTest(
forest,
level = 0.95,
target = c("AUTOC", "QINI"),
q = seq(0.1, 1, 0.1),
R = 500,
num.threads = 1,
seed = NULL,
failure.times = NULL,
honesty = TRUE,
stabilize.splits = TRUE,
sample.fraction = 0.5,
mtry = min(ceiling(sqrt(ncol(forest$X.orig)) + 20), ncol(forest$X.orig)),
min.node.size = 5,
honesty.fraction = 0.5,
honesty.prune.leaves = TRUE,
alpha = 0.05,
imbalance.penalty = 0,
...
)
forest |
An object of class |
... |
additional arguments passed to causal_forest. By default, the
arguments used by forest will be used to train new forests on the random
half-samples. Arguments provided through |
level |
numeric, level of RATE confidence interval. |
target |
character, see rank_average_treatment_effect. |
q |
numeric, see rank_average_treatment_effect. |
R |
integer, see rank_average_treatment_effect |
num.threads |
passed to causal_forest. Number of threads used in training. Default value is 1. |
seed |
numeric, either length 1, in which case the same seed is used for
both new forests, or length 2, to train each forest with a different seed.
Default is |
honesty |
Boolean, |
stabilize.splits |
Boolean, |
failure.times |
For valid results, specify the value used to train |
sample.fraction |
For valid results, specify the value used to train |
mtry |
For valid results, specify the value used to train |
min.node.size |
For valid results, specify the value used to train |
honesty.fraction |
For valid results, specify the value used to train |
honesty.prune.leaves |
For valid results, specify the value used to train |
alpha |
For valid results, specify the value used to train |
imbalance.penalty |
For valid results, specify the value used to train |
RATE evaluates the ability of a provided prioritization rule to prioritize treatment to subjects with a large benefit. In order to test for heterogeneity, we want estimated CATE's to define the prioritization rule. However, to obtain valid inference the prioritization scores must be constructed independently of the evaluating forest training data. To accomplice this, we split the data and train separate forests on each part. Then we estimate double robust scores on the observations used to train each forest, and obtain prioritization scores by predicting CATE's with each forest on the samples not used for training.
A list of class rank_average_treatment_effect
with elements
estimate: the RATE estimate.
std.err: bootstrapped standard error of RATE.
target: the type of estimate.
TOC: a data.frame with the Targeting Operator Characteristic curve estimated on grid q, along with bootstrapped SEs.
confint: a data.frame with the lower and upper bounds of the RATE confidence interval.
pval: the p-value for the test that RATE is non-positive.
KIJA
Yadlowsky S, Fleming S, Shah N, Brunskill E, Wager S. Evaluating Treatment Prioritization Rules via Rank-Weighted Average Treatment Effects. 2021. http://arxiv.org/abs/2111.07966.
n <- 2000
p <- 5
X <- matrix(rnorm(n * p), n, p)
X_surv <- matrix(runif(n * p), n, p)
W <- rbinom(n, 1, 0.5)
event_prob <- 1 / (1 + exp(2 * (pmax(2 * X[, 1], 0) * W - X[, 2])))
horizon <- 1
failure.time <- pmin(rexp(n) * X_surv[, 1] + W, horizon)
censor.time <- 2 * runif(n)
D <- as.integer(failure.time <= censor.time)
Y <- rbinom(n, 1, event_prob)
Y_surv <- pmin(failure.time, censor.time)
clusters <- sample(1:4, n, replace = TRUE)
cf <- grf::causal_forest(X, Y, W, clusters = clusters)
csf <- grf::causal_survival_forest(X, round(Y_surv, 2), W, D, horizon = horizon)
rate_cf <- RATEOmnibusTest(cf, target = "QINI")
rate_csf <- RATEOmnibusTest(csf, target = "QINI")
rate_cf
rate_csf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.