Learn R Programming

plotBart (version 0.1.7)

plot_overlap_vars: Plot the overlap of variables

Description

Plot histograms showing the overlap between variables by treatment status.

Usage

plot_overlap_vars(
  .data,
  treatment,
  confounders,
  plot_type = c("histogram", "density")
)

Arguments

.data

dataframe

treatment

character. Name of the treatment column within .data

confounders

character list of column names denoting confounders within .data

plot_type

the plot type, one of c('histogram', 'density'). Defaults to 'histogram'

Value

ggplot object

See Also

plot_overlap_pScores

Examples

Run this code
# NOT RUN {
data(lalonde)
plot_overlap_vars(
 .data = lalonde,
 treatment = 'treat',
 confounders = c('age', 'educ'),
 plot_type = 'Histogram'
)
# }

Run the code above in your browser using DataLab