Description Usage Arguments Value Examples
Assess balance for a single covairate.
1 |
data |
a dataframe object containing the variables and values. |
covariate |
a character vectors specifying the covariate |
w |
a character vector specifying the treatment variable. Treatment must be specified as 0 and 1 or TRUE and FALSE. |
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 | data(lalonde)
# histogram for continues variable:
univariate_balance_plot(lalonde, "age", "treat")
# bar plot for discrete factor variable:
lalonde$hisp <- factor(lalonde$hisp)
univariate_balance_plot(lalonde, "hisp", "treat")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.