Re: [S] linear convergence in glm.fit

Tony Plate (Tony.Plate@mcs.vuw.ac.nz)
Fri, 03 Apr 1998 09:49:29 +1200


Lawrence Becker writes:

>I am using SPlus v4.0 and am having problems with convergence error
>messages in glm. I have set maxit to a higher level using the following
>command, but still receive a warning:

A common cause of these warning messages with glm() is that a
particular value of one categorical predictor unambiguously
predicts the output.

E.g.,

> dd <- data.frame(x1=c(0,0,0,1,1),x2=c(0,1,0,0,1),y=c(0,0,1,1,1))
> glm(y ~ x1 + x2, family=binomail, data=dd)

[gives warning about linear convergence not obtained (or at least
it should give a warning -- if not, try adding maxit=7)]

> glm(y ~ x2, family=binomail, data=dd)

[works fine]

> dd
x1 x2 y
1 0 0 0
2 0 1 0
3 0 0 1
4 1 0 1
5 1 1 1

The problem is that x1=1 implies y is always 1. With the binomial
link function, this is best achieved by having an infinite positive
value for the coefficient for x1.

Maybe this is the cause of the warnings you are getting.

cheers,

Tony Plate

In message <19980402135302.064f3797.in@digitalis.net>, "Laurie Becker" writes:
>Dear SPlus users,
>
>I am using SPlus v4.0 and am having problems with convergence error
>messages in glm. I have set maxit to a higher level using the following
>command, but still receive a warning:
>
>> ht2glm12 <- glm(HT2 ~ ELEV + TOPO + AWC10 + AWC24 + AWC60 + WETNESS +
> WTKIND + INSOL + ASPECT + SURFTEX + CONFIG + SLOPE, family =
> binomial, control = glm.control(maxit = 100, epsilon = 1e-005,
> trace = T), data = htsites.upd)
>....
>
>Warning messages:
> Warning in glm.fit(tx, y, w, NULL, offset, family, control$maxit,
>control$epsilon,: linear convergence not obtained in 10 iterations.
>
>
>The model continues to run and seems to finish alright, but I am uncertain
>as to why I am getting the warning message and whether I should be
>concerned about it. Does glm.fit have a separate maxit parameter from
>glm.control?
>
>Thank you for any help you may be able to offer.
>
>Laurie Becker
>
>Land Information and Computer Graphics Facility
>University of Wisconsin - Madison
>
>
>-----------------------------------------------------------------------
>This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
>send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
>message: unsubscribe s-news

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news