Re: R-alpha: glm and substitute bugs

Gordon K Smyth (gks@maths.uq.oz.au)
Tue, 14 Jan 1997 17:48:30 +1100


Message-Id: <1.5.4.32.19970114064830.0090f78c@axiom.maths.uq.oz.au>
Date: Tue, 14 Jan 1997 17:48:30 +1100
To: Ross Ihaka <ihaka@stat.auckland.ac.nz>, Jim Lindsey <jlindsey@luc.ac.be>
From: Gordon K Smyth <gks@maths.uq.oz.au>
Subject: Re: R-alpha: glm and substitute bugs

At 03:30 PM 1/14/97 +1300, Ross Ihaka wrote:
[ stuff deleted]
>Which gets back to the original problem of how to handle singular
>design matrices.  The problem is that when the design is singular,
>the coefficients come back with NAs in positions corresponding to
>dependent columns.  This makes all the starting values be NA which is
>a disaster.  Another possible fix is to add
>	start[is.na(start)] <- 0
>immediately after
>	start <- qr.coef(fit, w*z)
>
>BUT there are some other problems when the design matrix is singular.
>It may be time to bite the bullet and really redo glm.

What about deleting the aliased columns of weights*X before entering IRLS
iteration?  This would avoid having the QR decomposition flail around anew
on each iteration, when the aliased columns cannot change.  The same could
be said of rows for which weights=0.

It would be closer to the spirit of glms (and to the GLIM and S
implementations) to have "start" refer to fitted values rather than
coefficients, i.e., to set starting values for the fitted values rather than
the coefficients.

It would be good to move closer to the GLIM treatment of singular matrices,
which is so much better than that of S.

Gordon
----------------------------------------------------------------------
Dr Gordon K Smyth           Telephone:  7-3365-3116, Fax:  7-3365-1477
Department of Mathematics, University of Queensland, Q 4072, Australia
E-mail:  gks@maths.uq.oz.au,     URL:  http://www.maths.uq.oz.au/~gks/
----------------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-