Skip to contents

Visualize balance of variables between treatment and control groups. Balance plot reflects balance in standardized units.

Usage

plot_balance(
  .data,
  treatment,
  confounders,
  compare = c("means", "variance", "covariance"),
  estimand = c("ATE", "ATT", "ATC")
)

Arguments

.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

Value

ggplot object

Author

George Perrett & Joseph Marlo

Examples

data(lalonde)
plot_balance(lalonde, 'treat', c('re78', 'age', 'educ'),
compare = 'means', estimand = 'ATE') +
labs(title = 'My new title')