From jlindsey@luc.ac.be  Wed Nov 12 08:58:18 1997
From: jlindsey@luc.ac.be (Jim Lindsey)
Date: Wed, 12 Nov 1997 09:58:18 +0100 (MET)
Subject: R-alpha: glm
Message-ID: <9711120858.AA24449@alpha.luc.ac.be>

Here is another bug in glm. Occasionally, with log linear models for
small tables, there can be more parameters (many aliased) than cells
in the table. Then, glm does not work. The problem is in the qr
decomposition. Here is a quick hack that works, although not very
elegant.
  In glm.fit, replace l. 254

Rmat <- fit$qr[1:nvars, 1:nvars]

by

Rmat <- diag(nvars)
nr <- min(sum(good),nvars)
Rmat[1:nr,1:nvars] <- fit$qr[1:nr,1:nvars]

  Jim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


R-alpha: glm
Jim Lindsey