Skip to content
Back to formatted view

Raw Message

Message-ID: <9711120858.AA24449@alpha.luc.ac.be>
Date: 1997-11-12T08:58:18Z
From: Jim Lindsey
Subject: R-alpha: glm

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=