Description Usage Arguments Value Examples
Assess balance in covariate distributio and assess ability to adjust for differences in covariates by treatment status.
1 2 3 4 5 6 7 8 9 10 |
data |
a dataframe object containing the variables and values. |
x |
a list of character vectors specifying the covariates. |
w |
a character vector describing the treatment variable. |
matched_indices |
a data frame of two columns, one of treatment indices and one of
matched (produced by |
method |
a character vector specifying the method for which to assess balance in covariate distributions across treatment and control groups. |
threshold |
the threshold to plot. Default is 0.2. |
colors |
an optional vector of two specifying the colors for the control and treatment groups, respectively. |
title |
an optional plot title. |
a ggplot
object.
1 2 3 4 5 6 7 8 9 | data(lalonde)
p <- propensity_score(lalonde, y = "re78", w = "treat")
matched_indices <- propensity_match(lalonde, w = "treat", p = p, max_distance = .00001)
vars <- names(lalonde)
covariates <- vars[!vars %in% c("re78", "treat")]
balance_plot(lalonde, x = covariates, w = "treat", matched_indices = matched_indices)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.