[R] glm.fit: fitted probabilities numerically 0 or 1 occurred for a continuous variable?

Marc Schwartz marc_schwartz at me.com
Mon Jun 16 22:33:11 CEST 2014


On Jun 16, 2014, at 2:34 PM, Nwinters <nicholas.winters at mail.mcgill.ca> wrote:

> I have gotten the this error before: "glm.fit: fitted probabilities
> numerically 0 or 1 occurred"
> 
> and the problem was usually solved by combining one or more categories were
> there were no observations.
> 
> I am now having this error show up for a variable that is continuous (not
> categorical).
> 
> What could be the cause of this for a continuous variable??
> 
> Thanks, 
> Nick


Presuming that this is logistic regression (family = binomial), the error is suggestive of complete or near complete separation in the association between your continuous IV and your binary response. This can occur if there is a breakpoint within the range of your IV where the dichotomous event is present on one side of the break and is absent on the other side of the break.

The resolution for the problem will depend upon first confirming the etiology of it and then, within the context of subject matter expertise, making some decisions on how to proceed. 

If you Google "logistic regression separation", you will get some resources that can be helpful.

Regards,

Marc Schwartz



More information about the R-help mailing list