RATETest {EpiForsk} | R Documentation |
wrapper for rank_average_treatment_effect
Description
Provides confidence interval and p-value together with the standard output from rank_average_treatment_effect.
Usage
RATETest(
forest,
priorities,
level = 0.95,
cov_type = c("continuous", "discrete"),
target = "AUTOC",
q = seq(0.1, 1, by = 0.1),
R = 500,
subset = NULL,
debiasing.weights = NULL,
compliance.score = NULL,
num.trees.for.weights = 500
)
Arguments
forest |
An object of class |
priorities |
character, name of covariate to test for heterogeneity. |
level |
numeric, level of RATE confidence interval. |
cov_type |
character, either "continuous" or "discrete". If "discrete", and q is not manually set, TOC will be evaluated at the quantiles corresponding to transitions from one level to the next. |
target |
character, see rank_average_treatment_effect. |
q |
numeric, see rank_average_treatment_effect. |
R |
integer, see rank_average_treatment_effect. |
subset |
numeric, see rank_average_treatment_effect. |
debiasing.weights |
numeric, see rank_average_treatment_effect. |
compliance.score |
numeric, see rank_average_treatment_effect. |
num.trees.for.weights |
integer, see rank_average_treatment_effect. |
Value
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.
Author(s)
KIJA
Examples
n <- 800
p <- 3
X <- matrix(rnorm(n * p), n, p)
W <- rbinom(n, 1, 0.5)
event_prob <- 1 / (1 + exp(2 * (pmax(2 * X[, 1], 0) * W - X[, 2])))
Y <- rbinom(n, 1, event_prob)
cf <- grf::causal_forest(X, Y, W)
rate <- RATETest(cf, 1)
rate$pval