It could be that for some levels of your independent factor variables (WS, 
SS), the response is either all zeroes or all ones.  Or, for your 
continuous independent variables (DV, DS), there is a clean break between 
the zeroes and ones.  For example, if all the CIDs are one when DS <= 18 
but all of the CIDs are zero when DS >=20, then there is no single best 
fit for a logistic model to that relation, the curve could be straight up 
steep, or gradual and shallow.

Do you get convergence if you fit these subset models?

glm(CID ~ WS, data=kimu, family=binomial)
glm(CID ~ SS, data=kimu, family=binomial)
glm(CID ~ DV, data=kimu, family=binomial)
glm(CID ~ DS, data=kimu, family=binomial)

Can you see the problem when you plot the data?
attach(kimu)
plot(WS, CID)
plot(SS, CID)
plot(DV, CID)
plot(DS, CID)

Jean



Anne Schaefer <annelsch...@gmail.com> wrote on 11/26/2012 08:46:26 PM:
> 
> Hello,
> 
> When I run the following glm model:
> 
> modelresult=glm(CID~WS+SS+DV+DS, data=kimu, family=binomial)
> 
> I get the following warning messages:
> 
> 1: glm.fit: algorithm did not converge
> 2: glm.fit: fitted probabilities numerically 0 or 1 occurred
> 
> What I am trying to do is model my response variable (CID: correct bird
> identification) as a function of the predictor variables weather state
> (WS), sea state (SS), distance from the vessel (DV) and duration of the
> sighting (DS). I defined both sea state and weather state as factors 
with
> three levels (0, 1, or 2). Distance of the vessel values are 100, 80, 
60,
> 40, and 20. Duration of the sighting ranges from 0 to 58 seconds.
> 
> The output R is giving me is:
> 
> Deviance Residuals:
>        Min          1Q      Median          3Q         Max
> -3.562e-05  -2.100e-08   2.100e-08   2.100e-08   3.632e-05
> 
> Coefficients:
>               Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.000e+02  1.067e+06   0.000    1.000
> WSf1         7.744e+01  9.086e+04   0.001    0.999
> WSf2         1.285e+01  6.199e+04   0.000    1.000
> SSf1        -1.042e+02  1.683e+05  -0.001    1.000
> SSf2        -1.859e+02  1.432e+05  -0.001    0.999
> DV           6.770e-01  9.394e+03   0.000    1.000
> DS           9.822e+00  1.884e+04   0.001    1.000
> 
> 
> What do the warning messages mean? Can I still use coefficient estimates
> and standard error values?
> 
> Thank you!

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to