gapclosing: Estimate Gaps Under an Intervention

Provides functions to estimate the disparities across categories (e.g. Black and white) that persists if a treatment variable (e.g. college) is equalized. Makes estimates by treatment modeling, outcome modeling, and doubly-robust augmented inverse probability weighting estimation, with standard errors calculated by a nonparametric bootstrap. Cross-fitting is supported. Survey weights are supported for point estimation but not for standard error estimation; those applying this package with complex survey samples should consult the data distributor to select an appropriate approach for standard error construction, which may involve calling the functions repeatedly for many sets of replicate weights provided by the data distributor. The methods in this package are described in Lundberg (2021) <doi:10.31235/>.

Version: 1.0.2
Imports: stats, mgcv, ranger, glmnet, magrittr, dplyr, forcats, ggplot2, tidyr, foreach, tidyselect, parallel, doParallel
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, spelling
Published: 2021-10-11
DOI: 10.32614/CRAN.package.gapclosing
Author: Ian Lundberg ORCID iD [aut, cre]
Maintainer: Ian Lundberg <ianlundberg at>
License: MIT + file LICENSE
NeedsCompilation: no
Language: en-US
Citation: gapclosing citation info
Materials: README
CRAN checks: gapclosing results


Reference manual: gapclosing.pdf
Vignettes: gapclosing


Package source: gapclosing_1.0.2.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): gapclosing_1.0.2.tgz, r-oldrel (arm64): gapclosing_1.0.2.tgz, r-release (x86_64): gapclosing_1.0.2.tgz, r-oldrel (x86_64): gapclosing_1.0.2.tgz
Old sources: gapclosing archive


Please use the canonical form to link to this page.