Description Usage Arguments Value Examples
Transformed Outcome Estimator
1 2 3 4 5 6 7 |
x |
a |
... |
ignored. |
y |
a vector of outcomes. |
tmt |
a vector indicating which units received treatment. |
est |
an estimator to use for modeling the treatment effect. This must
be a function which takes two arguments, |
data |
a |
A hete_tot
object.
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_tot(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.