Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Randomized Controlled Trial
. 2022 Jul:2022:1354-1357.
doi: 10.1109/EMBC48229.2022.9871333.

PsmPy: A Package for Retrospective Cohort Matching in Python

Randomized Controlled Trial

PsmPy: A Package for Retrospective Cohort Matching in Python

Adrienne Kline et al. Annu Int Conf IEEE Eng Med Biol Soc. 2022 Jul.

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.

PubMed Disclaimer

Similar articles

Cited by

Publication types

LinkOut - more resources