disparityplot {gapclosing}R Documentation

Plot a disparity

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

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


[Package gapclosing version 1.0.2 Index]