[R] binomial GLM quasi separation

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Oct 14 11:26:02 CEST 2011



On 13.10.2011 21:46, Ben Bolker wrote:
> lincoln<miseno77<at>  hotmail.com>  writes:
>
>>
>> Hi all,
>>
>> I have run a (glm) analysis where the dependent variable is the gender
>> (family=binomial) and the predictors are percentages.
>> I get a warning saying "fitted probabilities numerically 0 or 1 occurred"
>> that is indicating that quasi-separation or separation is occurring.
>> This makes sense given that one of these predictors have a very influential
>> effect that is depending on a specific threshold separating these effects,
>> in other words in my analysis one of these variables predicts males about
>> the 80% of times when its values are less or equal to zero and females about
>> the 80% when its values are greater than zero.
>> I have been looking at other posts about this but I haven’t understood how I
>> should act when the separation (or quasi separation) is not a statistical
>> artifact but it is something real.
>> As suggested in
>> http://r.789695.n4.nabble.com/
>>   OT-quasi-separation-in-a-logistic-GLM-td875726.html#a3850331
>> http://r.789695.n4.nabble.com/
>>   OT-quasi-separation-in-a-logistic-GLM-td875726.html#a3850331
>
>    [warning, broke URLs to make gmane happy]
>
>> (the last post is mine) I tried to use brglm procedure that uses a penalized
>> maximum likelihood but it made no difference.
>>
>
>    I'm not sure what's going on here, and I don't know why brglm()
> shouldn't work ... from a squint at your Nabble post (I can't
> really see the figure very well), I agree that
> the hcp profile is funky, but I wouldn't immediately conclude that
> the profile is bad -- in particular, it seems that the x-axis range
> is -45 to -15, rather than something like (-600,-300) as I would expect
> from the estimated parameter (ca. -400) and standard error (ca. 60).
> I would start by setting which=3 (to confine your attention to the
> hcp parameter) and messing around with the gridsize, stepsize, stdn
> parameters in profileModel to see what's going on.
>
>   If that doesn't work you might have to post data, or a subset of
> data, in order to get any more help ...


Or if just the separating hyperplane is to be found (and no tests have 
to be considered), I'd use an lda rather than logistic regression in 
such a case.

Uwe Ligges


> ______________________________________________
> 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.



More information about the R-help mailing list