Skip to content
Prev 2426 / 398506 Next

Algorithm used by glm, family=binomial?

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.