plot_balance | R Documentation |
Visualize balance of variables between treatment and control groups. Balance plot reflects balance in standardized units.
plot_balance(
.data,
treatment,
confounders,
compare = c("means", "variance", "covariance"),
estimand = c("ATE", "ATT", "ATC"),
limit_continuous = NULL,
limit_catagorical = NULL
)
.data |
dataframe |
treatment |
the column denoted treatment. Must be binary. |
confounders |
character list of column names denoting the X columns of interest |
compare |
character of either means or variance denotes what to compare balance on |
estimand |
character of either ATE, ATT or ATC the causal estimand you are making inferences about |
limit_continuous |
integer that can be used to limit the plot to only show the limit_continuous most imbalanced variables |
limit_catagorical |
integer that can be used to limit the plot to only show the limit_categorical most imbalanced variables |
ggplot object
George Perrett & Joseph Marlo
data(lalonde)
plot_balance(lalonde, 'treat', c('re78', 'age', 'educ'),
compare = 'means', estimand = 'ATE') +
labs(title = 'My new title')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.