Description Usage Arguments Value References
View source: R/disparityplot.R
Plots the factual and counterfactual mean outcomes in two categories. The returned object is a ggplot2 object which can be further customized using the syntax of ggplot2.
1 2 3 4 5 6 7 | disparityplot(
x,
category_A,
category_B,
custom_ylab = "Mean Outcome",
custom_xlab = "Category"
)
|
x |
An object of class |
category_A |
The first category to be plotted. A value of the category_name variable in x. |
category_B |
The second category to be plotted. Must be a value of |
custom_ylab |
Custom y-axis label. Defaults to "Mean Outcome" |
custom_xlab |
Custom x-axis label. Defaults to "Category" |
A ggplot2
object
Lundberg I (2021). "The gap-closing estimand: A causal approach to study interventions that close disparities across social categories." Sociological Methods and Research. Available at https://osf.io/gx4y3/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.