Misha Misha - 1 month ago 24
R Question

propensity score from logistic regression into MatchIT or other matching software in R

I´ve created my own propensity score that I would like to match on. However, in order to match on the score I need to feed this score into a matching algorithm. I can do it using the matching library, but I would prefer to use MatchIT (due to covariate checks and Zelig). However, MatchIT and the other libraries (nonrandom, twang etc) seem to require that the library itself also produces the score for the matching procedure. Any ways around this?

Answer

Using the matchit() function, if you have a vector ps of distance measures (e.g., your own propensity scores), you can use distance = ps. You'll get a warning, which you can ignore, and it will match on your distance measure.