R-beta: More glm bugs

Martin Maechler
Tue, 06 Jan 1998 10:36:18 -0000

>>>>> "Jim" == Jim Lindsey <jlindsey@luc.ac.be>
writes:

    Jim> 1. The null degrees of freedom do not allow for observations
weighted
    Jim> out although the residual df do.
    Jim> in glm.fit(), line. 271, change to
    Jim> nulldf <- nobs-qs.numeric(intercept)-sum(weights==0)
    Jim> similar to the following line for residual df

    Jim> 2. in print.glm(), I do not know what "Total df" means. At
present, it
    Jim> is the length of the residal vector, hence not allowing for
    Jim> observations weighted out, which does not make much sense.
Logically,
    Jim> it should be the df for the null deviance that follows directly and
    Jim> this is how students here tend to interpret it. Hence, I suggest
that
    Jim> line 286 be changed to
    Jim> cat("\nDegrees of Freedom:",x$df.null,"Total;",
    Jim> etc.

    Jim> 4. The problem with names of coefficients being mixed up when there
    Jim> is aliasing, that I have pointed out for some time with each new
    Jim> release, is still not corrected in 0.61. The fix is in the archives
    Jim> (move the 4 or 5 lines that shift names outside the iteration loop
in
    Jim> glm.fit)

I'm fixing these three (above). They should be in the next release
(0.61.patched  aka 0.61.1)

----

The following, I think is more a problem  of  model.matrix(.) and such lower
level functions which I leave for  Thomas and Ross ...

    Jim> 3. The following two lines should produce the same result but
don't:
    Jim> glm(y~x1:x2:x3-x1:x2:(1+x3))
    Jim> glm(y~x1:x2:x3-x1:x2:-x1:x2:x3)
    Jim> Only the second gives the correct answer. I have not tried to fix
this.

-- Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._