R-beta: More glm bugs

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
06 Jan 1998 13:21:52 +0100


Martin Maechler <maechler@stat.math.ethz.ch> writes:

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

There seems to be a typo in Jims 2nd example (extra :) (no, that was
not a smiley...). However, the problem seems to boil down to this:

> model.matrix(~x1:x2:1)
     (Intercept)
[1,]           1
[2,]           1
[3,]           1
[4,]           1
[5,]           1
[6,]           1
[7,]           1
[8,]           1
attr(,"assign")
[1] 0

Which is pretty clearly wrong. It should be the same as ~x1:x2

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

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