
Propensity Score Overlap Diagnostic Plot
plot_pscore_overlap.RdCreates a density plot comparing the distribution of propensity scores for treated and control units. Useful for assessing the overlap (common support) assumption required by many causal inference estimators.
Usage
plot_pscore_overlap(
pscore,
treatment,
trim_bounds = NULL,
title = "Propensity Score Overlap"
)Arguments
- pscore
Numeric vector of estimated propensity scores (values between 0 and 1).
- treatment
Binary vector (0/1 or logical) indicating treatment assignment. Must be the same length as
pscore.- trim_bounds
Numeric vector of length 2 specifying lower and upper bounds for trimming (e.g.,
c(0.1, 0.9)). If provided, vertical lines are drawn at these thresholds and observations outside the bounds are shaded. Default isNULL(no trimming lines).- title
Character string. Plot title. Default is
"Propensity Score Overlap".