Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

Warning in the Matchit package ("Glm.fit: fitted probabilities numerically 0 or 1 occurred") How to deal with that?

$
0
0

I'm running a code with around 200.000 observations, where 10.000 were treated and the remaining I'm trying to match using the package MatchIt.

Because of one of these variables, there is a warning message appearing and I don't know if I should just ignore it or not. The message is: Glm.fit: fitted probabilities numerically 0 or 1 occurred

The code that I'm running is similar to the one below:

m.out <- matchit(var ~ VAR1 + VAR2 + VAR3 + VAR4 + VAR5, data = mydata, method = "nearest", exact = c("VAR1", "VAR3", "VAR5"))

For illustration, let's say that the variable with the issue is the "VAR5". This variable is a character variable with about 200 different texts. So, my question is if this warning is a real problem or if it's just because there are too many options in this variable for the size of my data, and, because of that, it's not possible to find a treatment/control prediction? Anyway, is there something that I can do to not have this warning?

Best,


Viewing all articles
Browse latest Browse all 201945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>