Skip to content

Something changed and glm(..., family=binomial) doesn't work now

2 messages · Philip Riggs, Peter Dalgaard

#
I ran logistic regression models last week using glm 
(...,family=binomial) and got a set of results. Since then I have  
loaded the Epi package for ROC analysis. Now when I run those same  
models I get completely different results, with most being:

Warning message:
fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y  
= Y, weights = weights, start = start, etastart = etastart,

I didn't get this result last week. Also, the ROC function in Epi is  
no longer working (giving a ROC of 1.000). What would have changed to  
cause this and how can I fix it?

p.s. To check I ran the same model in S and have the same result as  
last week.

Philip
#
Philip Riggs <priggs at warnercnr.colostate.edu> writes:
Do you mean "load" or "install" Epi?? If the latter, does it matter
whether you use library(Epi) or not?

However: This sort of trouble usually means that you are not really
fitting the same models to the same data. The warning and the ROC
suggests that you have something in your model that gives perfect
separation between successes and failures. 

Are you using data=myframe in the glm call? Otherwise, you're open to
masking by variables in your workspace.