Message-Id: <199906281501.QAA21513@toucan.stats.ox.ac.uk>
Date: Mon, 28 Jun 1999 16:01:49 +0100 (BST)
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Subject: Re: [R] The glm object and the QR method
To: r-help@stat.math.ethz.ch, R.E.Darnell@newcastle.ac.uk
> X-Authentication-Warning: stat.math.ethz.ch: majordom set sender to
owner-r-help@stat.math.ethz.ch using -f
> To: r-help@stat.math.ethz.ch
> Subject: [R] The glm object and the QR method
> From: R.E.Darnell@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@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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._