This page explains the details of estimating weights from covariate balancing propensity scores by setting method = "cbps"
in the call to weightit
or weightitMSM
. This method can be used with binary, multinomial, and continuous treatments.
In general, this method relies on estimating propensity scores using generalized method of moments and then converting those propensity scores into weights using a formula that depends on the desired estimand. This method relies on CBPS
from the CBPS package.
For binary treatments, this method estimates the propensity scores and weights using CBPS
. The following estimands are allowed: ATE, ATT, and ATC. The weights are taken from the output of the CBPS
fit object. When the estimand is the ATE, the return propensity score is the probability of being in the "second" treatment group, i.e., levels(factor(treat))[2]
; when the estimand is the ATC, the returned propensity score is the probability of being in the control (i.e., non-focal) group. When include.obj = TRUE
, the returned object is the CBPS
fit.
For multinomial treatments with three or four categories and when the estimand is the ATE, this method estimates the propensity scores and weights using one call to CBPS
. For multinomial treatments with three or four categories or when the estimand is the ATT, this method estimates the propensity scores and weights using multiple calls to CBPS
. The following estimands are allowed: ATE and ATT. The weights are taken from the output of the CBPS
fit objects. When include.obj = TRUE
, the returned object is either a single CBPS
fit object if only one is used or a list of the CBPS
fits if multiple are used.
For continuous treatments, the generalized propensity score and weights are estimated using CBPS
. When include.obj = TRUE
, the returned object is the CBPS
fit.
For longitudinal treatments, the weights are the product of the weights estimated at each time point. This is not how CBMSM
in the CBPS package estimates weights for longitudinal treatments.
Sampling weights are supported through s.weights
in all scenarios. See Note about sampling weights.
Missing data is not compatible with the CBPS algorithm, so a few extra things happen when NA
s are present in the covariates. First, for each variable with missingness, a new missingness indicator variable is created which takes the value 1 if the original covariate is NA
and 0 otherwise. The missingness indicators are added to the model formula as main effects. The missing values in the covariates are then replaced with 0s (this value is arbitrary and does not affect estimation). The weight estimation then proceeds with this new formula and set of covariates. The covariates output in the resulting weightit
object will be the original covariates with the NA
s.
All arguments to CBPS
can be passed through weightit
or weightitMSM
, with the following exceptions:
method
in CBPS
is replaced with the argument over
in weightit
. Setting over = FALSE
in weightit
is the equivalent of setting method = "exact"
in CBPS
.
sample.weights
is ignored because sampling weights are passed using s.weights
.
standardize
is ignored.
All arguments take on the defaults of those in CBPS
. It may be useful in many cases to set over = FALSE
, especially with continuous treatments.
Binary treatments
Imai, K., & Ratkovic, M. (2014). Covariate balancing propensity score. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(1), 243<U+2013>263.
Multinomial Treatments
Imai, K., & Ratkovic, M. (2014). Covariate balancing propensity score. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(1), 243<U+2013>263.
Continuous treatments
Fong, C., Hazlett, C., & Imai, K. (2018). Covariate balancing propensity score for a continuous treatment: Application to the efficacy of political advertisements. The Annals of Applied Statistics, 12(1), 156<U+2013>177. 10.1214/17-AOAS1101
# NOT RUN {
library("cobalt")
data("lalonde", package = "cobalt")
#Balancing covariates between treatment groups (binary)
(W1 <- weightit(treat ~ age + educ + married +
nodegree + re74, data = lalonde,
method = "cbps", estimand = "ATT"))
summary(W1)
bal.tab(W1)
#Balancing covariates with respect to race (multinomial)
(W2 <- weightit(race ~ age + educ + married +
nodegree + re74, data = lalonde,
method = "cbps", estimand = "ATE"))
summary(W2)
bal.tab(W2)
#Balancing covariates with respect to re75 (continuous)
(W3 <- weightit(re75 ~ age + educ + married +
nodegree + re74, data = lalonde,
method = "cbps", over = FALSE))
summary(W3)
bal.tab(W3)
# }
Run the code above in your browser using DataLab