[R] glm's for a logistic regression - no warnings?

Dimitri Liakhovitski dimitri.liakhovitski at gmail.com
Tue Oct 1 16:41:31 CEST 2013


I have this weird data set with 2 predictors and one dependent variable -
attached.

predictor1 has all zeros except for one 1.
I am runnning a simple logistic regression:

temp<-read.csv("x data for reg224.csv")
myreg <- glm(dv~predictor1+predictor2,data=temp,
             family=binomial("logit"))
myreg$coef2

Everything runs fine and I get the coefficients - and the fact that there
is only one 1 on one of the predictors doesn't seem to cause any problems.

However, when I run the same regression in SAS, I get warnings:
 Model Convergence Status  Quasi-complete separation of data points
detected.

Warning: The maximum likelihood estimate may not exist.
Warning: The LOGISTIC procedure continues in spite of the above warning.
Results shown are based on the last maximum likelihood iteration. Validity
of the model fit is questionable.

And the coefficients SAS produces are quite different from mine.

I know I'll probably get screamed at because it's not a pure R question -
but any idea why R is not giving me any warnings in such a situation?
Does it have no problems with ML estimation in this case?

Thanks a lot!


-- 
Dimitri Liakhovitski


More information about the R-help mailing list