[R] The glm object and the QR method
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jun 28 17:01:49 CEST 1999
> X-Authentication-Warning: stat.math.ethz.ch: majordom set sender to
owner-r-help at stat.math.ethz.ch using -f
> To: r-help at stat.math.ethz.ch
> Subject: [R] The glm object and the QR method
> From: R.E.Darnell at newcastle.ac.uk (R.E. Darnell)
> Date: 28 Jun 1999 14:42:00 +0100
> Having tried (with some success) to use an alternative to the QR
> decomposition method for fitting generalised linear models by adapting
> the glm and glm.fit functions, I have noticed (to be honest, become
> frustrated with) how glm function and its dependents keep referencing
> qr lists. For example the glm.summary has the surprising line
> covmat.unscaled <- chol2inv(object$qr$qr[p1, p1, drop = FALSE])
> which seems to be an odd way of delivering the parameter
> (co)variance matrix.
You need for efficiency/stability to use a decomposition of the working
matrix, and the working matrix is not itself kept.
> Within the glm.fit function itself, much of the code is "QR specific".
> Call me pedantic, but does anyone else consider that the glm function
> should be more omnibus?.
You will need to start with lm, that is also method-specific (and
its QR is much `rawer' than in S).
Yes, it would be a good idea to rewrite glm for many such reasons, but
is that a high priority for R?
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help