plot_ICATE | R Documentation |
Plots a histogram of Individual Conditional Average Treatment effects (ICATE). ICATEs are the difference in each individual's predicted outcome under the treatment and predicted outcome under the control averaged over the individual. Plots of ICATEs are useful to identify potential heterogeneous treatment effects between different individuals. ICATE plots can be grouped by discrete variables.
plot_ICATE(.model, .group_by = NULL, n_bins = 30, .alpha = 0.7)
.model |
a model produced by 'bartCause::bartc()' |
.group_by |
a grouping variable as a vector |
n_bins |
number of bins |
.alpha |
transparency of histograms |
ggplot object
George Perrett
data(lalonde)
confounders <- c('age', 'educ', 'black', 'hisp', 'married', 'nodegr')
model_results <- bartCause::bartc(
response = lalonde[['re78']],
treatment = lalonde[['treat']],
confounders = as.matrix(lalonde[, confounders]),
estimand = 'ate',
commonSup.rule = 'none'
)
plot_ICATE(model_results, lalonde$married)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.