PsmPy: A Package for Retrospective Cohort Matching in Python
- PMID: 36086543
- DOI: 10.1109/EMBC48229.2022.9871333
PsmPy: A Package for Retrospective Cohort Matching in Python
Abstract
Propensity score matching (PSM) is a technique used in retrospective investigation of cohort matching as an alternative approach to the prospective matching that is typically used by a randomized control trial (RCT). The process of selecting untreated cases that are the best match to the treated cases is the focus of this research. We created a PSM package for the python environment, termed PsmPy, to carry out this task. The PsmPy package debuted and proposed here is based on a logistic regression logit score where a match is selected using k-nearest neighbors (k-NN). Additional plotting and arguments are available to the user and are also described. To benchmark our method, we compared it with the existing R package, MatchIt, and evaluated our covariates' residual effect sizes with respect to the treatment condition before and after matching. Using a Mann-Whitney statistical test, we showed that our method significantly outperformed MatchIt in cohort matching (U=49, p<0.0001) when comparing residual effect sizes of the covariates. The PsmPy demonstrated a 10-fold average improvement in residual effect sizes amongst covariates when compared with the package MatchIt, suggesting that it is a viable alternative for use in propensity matching studies.
Similar articles
-
Applied comparison of large-scale propensity score matching and cardinality matching for causal inference in observational research.BMC Med Res Methodol. 2021 May 24;21(1):109. doi: 10.1186/s12874-021-01282-1. BMC Med Res Methodol. 2021. PMID: 34030640 Free PMC article.
-
Propensity score method: a non-parametric technique to reduce model dependence.Ann Transl Med. 2017 Jan;5(1):7. doi: 10.21037/atm.2016.08.57. Ann Transl Med. 2017. PMID: 28164092 Free PMC article.
-
Five Steps to Successfully Implement and Evaluate Propensity Score Matching in Clinical Research Studies.Anesth Analg. 2018 Oct;127(4):1066-1073. doi: 10.1213/ANE.0000000000002787. Anesth Analg. 2018. PMID: 29324498
-
Indirect covariate balance and residual confounding: An applied comparison of propensity score matching and cardinality matching.Pharmacoepidemiol Drug Saf. 2022 Dec;31(12):1242-1252. doi: 10.1002/pds.5510. Epub 2022 Jul 20. Pharmacoepidemiol Drug Saf. 2022. PMID: 35811396
-
Propensity Score Matching: The 'Devil is in the Details' Where More May Be Hidden than You Know.Am J Med. 2020 Feb;133(2):178-181. doi: 10.1016/j.amjmed.2019.08.055. Epub 2019 Oct 13. Am J Med. 2020. PMID: 31618617 Review.
Cited by
-
The effect of COVID-19 vaccination and booster on maternal-fetal outcomes: a retrospective multicenter cohort study.medRxiv [Preprint]. 2022 Aug 18:2022.08.12.22278727. doi: 10.1101/2022.08.12.22278727. medRxiv. 2022. Update in: Lancet Digit Health. 2023 Sep;5(9):e594-e606. doi: 10.1016/S2589-7500(23)00093-6. PMID: 36032974 Free PMC article. Updated. Preprint.
-
Association of Helicobacter pylori Positivity With Risk of Disease and Mortality.Clin Transl Gastroenterol. 2023 Sep 1;14(9):e00610. doi: 10.14309/ctg.0000000000000610. Clin Transl Gastroenterol. 2023. PMID: 37367296 Free PMC article.
-
Propensity score-adjusted analysis on early tirofiban administration to prevent thromboembolic complications during stand-alone coil embolization of ruptured aneurysms.Sci Rep. 2024 Nov 1;14(1):26350. doi: 10.1038/s41598-024-77354-1. Sci Rep. 2024. PMID: 39487205 Free PMC article.
-
Traumatic Brain Injury and Risk of Incident Comorbidities.JAMA Netw Open. 2024 Dec 2;7(12):e2450499. doi: 10.1001/jamanetworkopen.2024.50499. JAMA Netw Open. 2024. PMID: 39666337 Free PMC article.
-
Assessing fairness in machine learning models: A study of racial bias using matched counterparts in mortality prediction for patients with chronic diseases.J Biomed Inform. 2024 Aug;156:104677. doi: 10.1016/j.jbi.2024.104677. Epub 2024 Jun 13. J Biomed Inform. 2024. PMID: 38876453 Free PMC article.
Publication types
MeSH terms
Grants and funding
LinkOut - more resources
Miscellaneous