Propensity Score Matching Python-based code
Description
This repository offers a free, Python-based code for performing propensity score (PS) matching. Designed for clinicians and researchers, this tool simplifies PS matching and provides comprehensive visualizations to assess matching quality. The code implements (i) Logistic regression to calculate PS, (ii) 1:N matching using the K-nearest neighbor (KNN) algorithm with a customizable caliper, (iii) sampling without replacement to ensure robust matching, and (iv) visualizations for assessing matching quality. Outputs: Matched pairs saved as a .csv file (and identified as Coxreg requires) as well as diagnostic plots saved in the specified output folder. Under the MIT License, this code was developed with assistance and refinement provided by OpenAI's ChatGPT.
Notes
Files
Barplot.png
Additional details
Dates
- Updated
-
2025-01-10
Software
- Repository URL
- https://github.com/epsar-co/Propensity-Score-Matching-Python-based-code.git
- Programming language
- Python