Re: [R] warning message in a glm model

From: Ted Harding <>
Date: Fri, 21 Mar 2008 16:54:00 +0000 (GMT)

On 21-Mar-08 15:59:05, Alfonso Pérez wrote:
> Hello, my name is Alfonso. I want to apply a logistic model to my data.
> The variables are, fish length and age length as a continous variable,
> and cohort as a factor. I consider the interaction between age and
> cohort in the model. The dependent variable is the probability of being
> mature. Then the model is as follow:
> ogive <- glm(mature~length+(cohort*age), family=binomial,
> data=subset.cod)
> But when I run it in R I obtain a Warning message:
> Warning message:
> In = X, y = Y, weights = weights, start = start, etastart =
> etastart, :
> fitted probabilities numerically 0 or 1 occurred
> I don't understand what's the problem, could you help me? thank you
> in advance.
> Alfonso.

There was effectively the same question from Werner Wernersen: "[R] "fitted probabilities numerically 0 or 1 occurr" 11 March 2008 08:58:55.

See my response to him:
"Re: [R] "fitted probabilities numerically 0 or 1 occurr" From: (Ted Harding) <> Date: Tue, 11 Mar 2008 10:08:09 -0000 (GMT)

which covers the maun issues.

The underlying reason is that some linear function of your covariates compeletly separates the "Y=1" cases from the "Y=0" cases, so the GLM can predict probability 1 for "Y=1", and probability 0 for "Y=0".

Best wishes,

E-Mail: (Ted Harding) <> Fax-to-email: +44 (0)870 094 0861
Date: 21-Mar-08                                       Time: 16:53:54
------------------------------ XFMail ------------------------------

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 21 Mar 2008 - 16:56:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 21 Mar 2008 - 17:30:22 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive