I've been using the MatchIt package in R to do treatment versus control matching, and I can't get the optimal matching to work with my own dataset.
If I run the following code:
m.out <- matchit(match_formula, data=stats, method='optimal', distance='logit', ratio=2)
where the formula is
treatment ~ t_1 + t_2 + t_3 + t_4 + t_5 + t_6 + t_7 + t_8 + t_9 +
t_10 + t_11
then I end up with the error
Error in fullmatch.matrix(d, min.controls = ratio, max.controls = ratio, : omit.fraction must be NULL or numeric between -1 and 1
I couldn't find anywhere in the matchit
method to specify an omit.fraction variable or what that even does. Is there any way to get around this bug and perform optimal matching?