MatchIt

Exact matching using R - MatchIt package

Recently, I was asked to help create a matching algorithm for a retrospective cohort study. The request was to perform an exact match on a single variable using a 2 to 1 ratio (unexposed to exposed). Normally, I would use a propensity score match (PSM) approach, but the data did not have enough variables for each unique subject. With PSM, I tend to build a logit (or probit) model using variables that would be theoretically associated with the treatment assignment. However, this approach requires enough observable variables to construct these PSM models. For this request, there were a few variables for each subjects; the only variable available were the unique identifier, site, and a continuous variable.

This problem led to a tutorial on how to perform an exact match using the MatchIt package in R, which can be viewed here in my RPubs page.

In this tutorial, you will learn how to perform an exact match with a single variable using a hypothetical dataset with 30 subjects.