[R-sig-eco] Logistic Regression

Philip Dixon pdixon at iastate.edu
Wed Jun 8 14:24:02 CEST 2011


Luiz,

Gavin gave a nice explanation.  Another way to think about the issue is 
to remember that Xb models the logit of the probability of predation.  
When P[pred] = 0, the logit is -inf.  Hence, the b coefficient for that 
group is estimated at -inf (or usually something between -12 and -18, 
because the software gives up and P[pred | Xb = -18] is numerically 
indistinguishable from 0.  This is still useful, because the b's for 
other covariates still have meaning, even for that group with P[pred = 
0].  If you look at predicted Xb's for obs in the group with P[pred = 
0], you will see they are not exactly the same (on the Xb scale).  
That's the effect of the other covariates.  Those effects are estimated 
from the observed covariate effect in other groups.   When you 
backtransform from Xb to P[pred], the predicted P[pred] are all 
essentially 0, which is fine.  So, use all the groups!

If you really want estimates of the coefficients, you should consider 
regularizing, as suggested by Eric.  There are Bayesian approaches and 
penalized likelihoods, e.g., Firth's penalized likelihood.  The Bayesian 
approach is probably the easier to compute.

However, your e-mail suggested you fit this model to use in a model 
comparison.  All you need for model comparison is the lnL or something 
derived from that (AIC, BIC, ...).  The lnL is computed correctly even 
if the estimate is -12 or -18 or -inf.   If all you need is a model 
comparison, no need to regularize.

Best wishes,
Philip Dixon



More information about the R-sig-ecology mailing list