I'm using the CBPS package in R to calculate covariate balancing propensity scores following Imai and Ratkovic 2014. However, I'm a bit confused. The scores that I get from the CBPS package -- are those both weights and propensity scores or just weights? Do I use those scores to weight my covariates only or do I match on closest scores and then weight my covariates?
CBPS object that is the output of a call to
CBPS() contains both
$fitted.values, which are the estimated propensity scores, and
$weights, which are the estimated weights. You can match on the estimated propensity scores or perform some kind of weighting (e.g., IPW for the ATE, weighting by the odds for the ATT) using the propensity scores or the weights. In theory, calculating weights from the estimated propensity scores yourself should yield the same weights that are supplied by
CBPS() using the corresponding formula, but I've encountered some issues where this is not true, and so I trust the estimated propensity scores more.
Glad to see this package being used! I find it vastly outperforms
twang and is much faster. If you want to check balance on your covariates, I recommend the
cobalt package, which has methods for
You should decide first if you want to use matching or weighting. the command of
$fiited.values will provide you the propensity scores but you can also get weights by using
$weights. However, you should keep in mind that you cannot get ATT in case of multiple treatments. CBPS package currently only provides ATE for multiple treatment and ATT is only available in case of binary treatments.