[R] glm's for a logistic regression - no warnings?
Bert Gunter
gunter.berton at gene.com
Tue Oct 1 16:49:35 CEST 2013
google "complete separation logistic"
-- Bert
On Tue, Oct 1, 2013 at 7:41 AM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
More information about the R-help
mailing list