Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

balance

Optimal Covariate Balance


Description

Returns the mean and standardized mean associated with each treatment group, before and after weighting. To access more comprehensive diagnotistics for assessing covariate balance, consider using Noah Greifer's cobalt package.

Usage

balance(object, ...)

Arguments

object

A CBPS, npCBPS, or CBMSM object.

...

Additional arguments to be passed to balance.

Details

For binary and multi-valued treatments as well as marginal structural models, each of the matrices' rows are the covariates and whose columns are the weighted mean, and standardized mean associated with each treatment group. The standardized mean is the weighted mean divided by the standard deviation of the covariate for the whole population. For continuous treatments, returns the absolute Pearson correlation between the treatment and each covariate.

### @aliases balance balance.npCBPS balance.CBPS balance.CBMSM

Value

Returns a list of two matrices, "original" (before weighting) and "balanced" (after weighting).

Author(s)

Christian Fong, Marc Ratkovic, and Kosuke Imai.

Examples

###
### Example: Assess Covariate Balance
###
data(LaLonde)
## Estimate CBPS
fit <- CBPS(treat ~ age + educ + re75 + re74 + 
			I(re75==0) + I(re74==0), 
			data = LaLonde, ATT = TRUE)
balance(fit)

CBPS

Covariate Balancing Propensity Score

v0.22
GPL (>= 2)
Authors
Christian Fong [aut, cre], Marc Ratkovic [aut], Kosuke Imai [aut], Chad Hazlett [ctb], Xiaolin Yang [ctb], Sida Peng [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.