Learn R Programming

plotBart (version 0.1.7)

plot_overlap_pScores: Plot the overlap via propensity score method

Description

Plot histograms showing the overlap between propensity scores by treatment status.

Usage

plot_overlap_pScores(
  .data,
  treatment,
  response,
  confounders,
  plot_type = c("histogram", "density"),
  pscores = NULL,
  ...
)

Arguments

.data

dataframe

treatment

character. Name of the treatment column within .data

response

character. Name of the response column within .data

confounders

character list of column names denoting confounders within .data

plot_type

the plot type, one of c('Histogram', 'Density')

pscores

propensity scores. If not provided, then propensity scores will be calculated using BART

additional arguments passed to `bartCause::bartc` propensity score calculation

Value

ggplot object

See Also

plot_overlap_vars

Examples

Run this code
# NOT RUN {
data(lalonde)
plot_overlap_pScores(
 .data = lalonde,
 treatment = 'treat',
 response = 're78',
 confounders = c('age', 'educ'),
 plot_type = 'histogram',
 pscores = NULL,
 seed = 44
)
# }

Run the code above in your browser using DataLab