Learn R Programming

gapclosing

Estimate Gaps Under an Intervention

Summary

Provides functions to estimate gap-closing estimands: the disparities across categories (e.g. Black and white) that persists if a treatment variable (e.g. college) is equalized. The purpose is to estimate the average outcomes that units would realize if exposed to a counterfactual treatment assignment rule.

The package will enable the user to:

  • Estimate treatment and outcome prediction functions with Generalized Linear Models, Generalized Additive Models, ridge regression, or random forest
  • Combine those in doubly-robust estimators of gap-closing estimands
  • Produce confidence intervals by the bootstrap
  • Visualize the result in plots

Installation instructions

Install from CRAN with one line: install.packages("gapclosing").

To install the latest development version,

  1. First, install the devtools package: if(!require(devtools)) install.packages("devtools")
  2. Then, install the gapclosing package with the command devtools::install_github("ilundberg/gapclosing").

Getting started

To get started, see the vignette. Also see the working paper for which this package is the software implementation.

Lundberg, Ian. Forthcoming. "The gap-closing estimand: A causal approach to study interventions that close disparities across social categories." Sociological Methods and Research. Draft available at https://doi.org/10.31235/osf.io/gx4y3.

Copy Link

Version

Install

install.packages('gapclosing')

Monthly Downloads

214

Version

1.0.2

License

MIT + file LICENSE

Maintainer

Ian Lundberg

Last Published

October 11th, 2021

Functions in gapclosing (1.0.2)

as.data.frame.gapclosing

Coerce to a Data Frame
print.gapclosing

Print function for gapclosing objects
%>%

Pipe operator
plot.gapclosing

Plot function for gapclosing objects
generate_simulated_data

Generate simulated data
pairwise_diff

Pairwise difference calculator
summary.gapclosing

Summary function for gapclosing objects
disparityplot

Plot a disparity
gapclosing

Gap closing estimator
cross_fit_estimator

Cross-fitting gap closing estimator
df_to_gapclosing_list

Convert Back to Canonical List Output
fit_ridge

Ridge regression estimator
point_estimator

Point estimator for gap-closing estimands