R-beta: More glm bugs

Jim Lindsey (jlindsey@luc.ac.be)
Tue, 6 Jan 1998 11:00:11 +0100 (MET)


From: Jim Lindsey <jlindsey@luc.ac.be>
Message-Id: <9801061000.AA20049@alpha.luc.ac.be>
Subject: R-beta: More glm bugs
To: r-help@stat.math.ethz.ch (r-help)
Date: Tue, 6 Jan 1998 11:00:11 +0100 (MET)

  1. The null degrees of freedom do not allow for observations weighted
out although the residual df do.
in glm.fit(), line. 271, change to
	nulldf <- nobs-qs.numeric(intercept)-sum(weights==0)
similar to the following line for residual df
  2. in print.glm(), I do not know what "Total df" means. At present, it
is the length of the residal vector, hence not allowing for
observations weighted out, which does not make much sense. Logically,
it should be the df for the null deviance that follows directly and
this is how students here tend to interpret it. Hence, I suggest that
line 286 be changed to
	cat("\nDegrees of Freedom:",x$df.null,"Total;",
etc.
  3. The following two lines should produce the same result but don't:
	glm(y~x1:x2:x3-x1:x2:(1+x3))
	glm(y~x1:x2:x3-x1:x2:-x1:x2:x3)
Only the second gives the correct answer. I have not tried to fix this.
  4. The problem with names of coefficients being mixed up when there
is aliasing, that I have pointed out for some time with each new
release, is still not corrected in 0.61. The fix is in the archives
(move the 4 or 5 lines that shift names outside the iteration loop in
glm.fit)
  Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._