An R package for finding covariate balancing weights for causal inference. These functions find the solution to a convex optimization problem using Bregman distances as the criterion function. The balancing weights are evaluated as the generalized projection of the sampling weights into an intersection of hyperplanes that form the basis of a linear subspace. This linear subspace constrains the moments for the empirical distribution of the covariates to be identical between treatment groups.
In its current form, cbal supports three Bregman distances and requires a binary treatment assignment. In the future, this package will be extended to allow for other criterion distance functions and multivalued treatment assignments.
Options for installing cbal:
- Install the developmental version from github. This will require you to have devtools installed and, if you are using Windows, you'll need Rtools installed as well.
library(devtools)
install_github("kevjosey/cbal", build_vignettes = TRUE)
- Clone the repo and use
GNU make
make install
- Go to the release page and download the tar.gz file of the version you want to install.
- Install from the command line
R CMD INSTALL cbal_<version>.tar.gz
- Within R
install.packages(<path_to_file>, repos = NULL, type = "source")