Can someone please help.

I am using the R package MatchIt for propensity score matching. I was able to match my treatment and control groups by using the following 2 lines of code:

m.out = matchit (Group ~ Gender + Ethnicity + SES, data = mydata, method = "nearest", ratio =1)

summary (m.out)

I want to access my matched data so I can analyze it in excel. But when I use the following code I get an error message:

Outdata <- match.data (m.out)

I get the following error message:

Error: could not find function "match.data"

Thank you, NJ


1 Answer 1


Make sure you have the "MatchIt" package loaded:


Usually that error pops up when you don't have the required package loaded. Check the help file if you need more info on the function.

  • $\begingroup$ Thank you for your response. I have loaded "MatchIt". I reloaded it just to be sure...still getting the error message! $\endgroup$
    – Nora Jones
    Feb 24, 2016 at 21:13
  • $\begingroup$ Can you post the code you're using? It might help debug what you're looking at. $\endgroup$ Feb 24, 2016 at 21:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.