plot_SATE {plotBart} | R Documentation |
Plot histogram or density of Sample Average Treatment Effects
Description
Plot a histogram or density of the Sample Average Treatment Effect (SATE). The Sample Average Treatment Effect is derived from taking the difference of each individual's observed outcome and a predicted counterfactual outcome from a BART model averaged over the population. The mean of SATE will resemble means of CATE and PATE but will account for the least uncertainty.
Usage
plot_SATE(
.model,
type = c("histogram", "density"),
ci_80 = FALSE,
ci_95 = FALSE,
reference = NULL,
.mean = FALSE,
.median = FALSE
)
Arguments
.model |
a model produced by 'bartCause::bartc()' |
type |
histogram or density |
ci_80 |
TRUE/FALSE. Show the 80% credible interval? |
ci_95 |
TRUE/FALSE. Show the 95% credible interval? |
reference |
numeric. Show a vertical reference line at this x-axis value |
.mean |
TRUE/FALSE. Show the mean reference line |
.median |
TRUE/FALSE. Show the median reference line |
Value
ggplot object
Author(s)
George Perrett, Joseph Marlo
Examples
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_SATE(model_results)
[Package plotBart version 0.1.7 Index]