methodsmatchexact-match

Exact Matching with r MatchIt with ratio 1:4


I would like to run an exact match by state but at the same time I would like a ratio of 1 to 4 case:control. Will the following code do the trick? I understand method=exact won't work since that method does not support the ratio parameter. If yes, how do I check if matching is exact? If not, how can I fix my code? I have plenty of data (255 cases & 7500 control so exact shouldn't be a problem at all)

Thank you!

exact_match <- matchit(case ~ state , ratio = 4,  data = case_crude, exact="statabbr")

Solution

  • I'm not sure why you would want to throw out any units that are more than the 4th exact match. For example, if 5 control units resemble your treated unit, why would you only want to retain 4 of them?

    Otherwise, that code should work to do what you want. It performs 4:1 nearest neighbor matching on a propensity score estimated with state as the sole predictor with exact matching on statabbr.

    To check if exact matching was successful, check balance using summary(). You should see that the mean differences are 0 and the pair distance are also 0 (i.e., implying that within each pair, the values of statabbr are identical.