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)A numeric vector of overlap weights with length equal to nrow(data).
A list returned by estimate_ps(), containing:
ps_matrix: Matrix of propensity scores (n x J) for multiple treatments, or NULL for binary treatment
ps: Vector of propensity scores for observed treatment
n_levels: Number of treatment levels
treatment_levels: Vector of treatment level values
A data.frame containing the treatment variable.
A character string specifying the name of the treatment
variable in data.
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.
Li, F., & Li, F. (2019). Propensity score weighting for causal inference with multiple treatments. The Annals of Applied Statistics, 13(4), 2389-2415.