| calculate_overlap_weights | R Documentation |
Calculates overlap weights using the Li & Li (2019) formula for binary or multiple treatment groups. Overlap weights target the population with the most equipoise and are bounded between 0 and 1.
calculate_overlap_weights(ps_result, data, treatment_var)
ps_result |
A list returned by
|
data |
A data.frame containing the treatment variable. |
treatment_var |
A character string specifying the name of the treatment
variable in |
For multiple treatments, overlap weights are calculated as:
w_j(X_i) = \frac{1/e_j(X_i)}{\sum_{l=1}^{J} 1/e_l(X_i)}
For binary treatment (J=2), this reduces to:
w(X) = 1 - P(Z = observed | X)
which equals the probability of receiving the opposite treatment.
A numeric vector of overlap weights with length equal to nrow(data).
Li, F., & Li, F. (2019). Propensity score weighting for causal inference with multiple treatments. The Annals of Applied Statistics, 13(4), 2389-2415.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.