Skip to content

Algorithm used by glm, family=binomial?

2 messages · Barnet Wagman, Brian Ripley

#
Does anyone know what algorithm R uses in glm, family=binomial (i.e. a
logit model)?

I assume that it's in the source somewhere, but I wasn't able to find
it.  I'd like to know
what file it's in (in a unix distribution of R).

Thanks for your help.

---------------------------

Barnet Wagman

wagman at enteract.com

1361 N. Hoyne, 2nd floor
Chicago, IL 60622

773-645-8369

--------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/19990419/720e5901/attachment.html
#
On Mon, 19 Apr 1999, Barnet Wagman wrote:

            
src/library/base/R/glm.R, or just list the glm and glm.fit functions.
The `meat' is in glm.fit.

R uses the `standard' Nelder-Wedderburn IWLS algorithm for this problem.
That is explained in a number of places.  One Bill Venables and I
particularly like is

Firth, D. (1991) Generalized linear models. Chapter 3 of Hinkley, D. V.,
Reid, N. and Snell, E. J. eds (1991) Statistical Theory and Modelling. In
Honour of Sir David Cox, FRS. London: Chapman & Hall.

Perhaps the most elementary exposition is in

A. J. Dobson (1990) "An Introduction to Generalized Linear Models"
Chapham & Hall.

which was previously

A. J. Dobson (1983) "An Introduction to Statistical Modelling".
  
It is a useful exercise (one I set our graduate students) to write out the
details in the logistic regression case, where some terms cancel.