[R] Something changed and glm(..., family=binomial) doesn't work now
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Sat Feb 18 11:19:20 CET 2006
Philip Riggs <priggs at warnercnr.colostate.edu> writes:
> 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.
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.
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list