plot.CBPS {CBPS} R Documentation

## Plotting Covariate Balancing Propensity Score Estimation

### Description

This function plots the absolute difference in standardized means before and after weighting. To access more sophisticated graphics for assessing covariate balance, consider using Noah Greifer's cobalt package.

### Usage

## S3 method for class 'CBPS'
plot(x, covars = NULL, silent = TRUE, boxplot = FALSE, ...)


### Arguments

 x an object of class “CBPS” or “npCBPS”, usually, a result of a call to CBPS or npCBPS. covars Indices of the covariates to be plotted (excluding the intercept). For example, if only the first two covariates from balance are desired, set covars to 1:2. The default is NULL, which plots all covariates. silent If set to FALSE, returns the imbalances used to construct the plot. Default is TRUE, which returns nothing. boxplot If set to TRUE, returns a boxplot summarizing the imbalance on the covariates instead of a point for each covariate. Useful if there are many covariates. ... Additional arguments to be passed to plot.

### Details

The "Before Weighting" plot gives the balance before weighting, and the "After Weighting" plot gives the balance after weighting.

### @aliases plot.CBPS plot.npCBPS

### Value

For binary and multi-valued treatments, plots the absolute difference in standardized means by contrast for all covariates before and after weighting. This quantity for a single covariate and a given pair of treatment conditions is given by \frac{\sum_{i=1}^{n} w_i * (T_i == 1) * X_i}{\sum_{i=1}^{n} (T_i == 1) * w_i} - \frac{\sum_{i=1}^{n} w_i * (T_i == 0) * X_i}{\sum_{i=1}^{n} (T_i == 0) * w_i}. For continuous treatments, plots the weighted absolute Pearson correlation between the treatment and each covariate. See https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient#Weighted_correlation_coefficient.

### Author(s)

Christian Fong, Marc Ratkovic, and Kosuke Imai.