Description Usage Arguments Value References Examples
X-Learner Meta-Estimator
1 2 3 4 5 6 7 8 9 |
x |
a |
... |
ignored. |
y |
a vector of outcomes. |
tmt |
a vector indicating which units received treatment. |
est, tmt_est, ctl_est, te_tmt_est, te_ctl_est |
an estimator to use for
modeling the treatment effect. This must be a function which takes two
arguments, |
data |
a |
A hete_x
object.
K<c3><bc>nzel, S., Sekhon, J., Bickel, P., & Yu, B. (2017). Meta-learners for Estimating Heterogeneous Treatment Effects using Machine Learning. arXiv preprint arXiv:1706.03461.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(tidyverse)
data(gotv)
df <- gotv %>%
filter(treatment %in% c("Control", "Neighbors")) %>%
mutate(treatment = ifelse(treatment == "Control", 0, 1))
m <- hete_x(voted ~ . | treatment, data = df, est = random_forest)
p <- predict(m, df)
uc <- uplift(df$voted, df$treatment, p)
plot(uc)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.