disparityplot: Plot a disparity

Description Usage Arguments Value References

View source: R/disparityplot.R

Description

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.

Usage

1
2
3
4
5
6
7
disparityplot(
  x,
  category_A,
  category_B,
  custom_ylab = "Mean Outcome",
  custom_xlab = "Category"
)

Arguments

x

An object of class gapclosing, which results from a call to the function gapclosing

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 x$category

custom_ylab

Custom y-axis label. Defaults to "Mean Outcome"

custom_xlab

Custom x-axis label. Defaults to "Category"

Value

A ggplot2 object

References

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/.


gapclosing documentation built on Oct. 11, 2021, 9:07 a.m.