PSM for causal inference | MatchIt | Covariate Balance | Treatment Effect Estimation
Propensity Score Matching (PSM) is a statistical technique used to estimate the causal effect of a treatment by matching treated and control subjects with similar propensity scores. The propensity score is the probability of receiving treatment given observed covariates.
Simulated treatment study (n=400) with treatment confounded by age, sex, BMI, and smoking status. Treatment has a true effect of +3 on the continuous outcome and log-odds +1.2 on the binary outcome.
Ho DE, Imai K, King G, Stuart EA. MatchIt: Nonparametric Preprocessing for Parametric Causal Inference. Journal of Statistical Software. 2011;42(8):1-28.
No. The PS model only includes baseline covariates (treatment ~ age + sex + ...), as per Rubin (1997). The outcome is used only after matching for effect estimation, never in the PS model.
Caliper = caliper x SD(logit PS), default 0.2 SD, following Austin (2011). This is implemented in MatchIt(distance="glm", caliper=...) in logit units.
For categorical variables, the app reports the maximum proportion difference (max |p1 - p0|), not the continuous SMD formula, with the 0.1 balance threshold based on VanderWeele & Ding (2017).
Yes. MatchIt matching weights are used via survey::svyglm for effect estimation, with SEs adjusted by the survey design. For 1:1 matching without replacement, a paired t-test is additionally provided.
Yes. The Balance Table header shows matched sample sizes (e.g., Treated: 100 -> 80, Control: 200 -> 80), and unmatched subjects are excluded with a notification.
No. The denominator uses the Kish factor n_eff = (sum w)^2 / sum(w^2), rather than naive sum(w)=1, avoiding underestimation in small samples.
Yes. Standardized difference tables and Love plots are provided; all covariates with SMD < 0.1 are considered adequately balanced.
Users can switch caliper, matching ratio, and replacement in the UI, and download matched data for external regression sensitivity checks.
R >= 4.0, MatchIt >= 4.0, survey, shiny. The code is open-source and reproducible.
Matched weight data can be directly fed into Fine-Gray or Cox models (see the CompetingRisk component in this project). This module reports mean/ratio effects only.