R-alpha: glm bugs

Jim Lindsey (jlindsey@luc.ac.be)
Mon, 23 Dec 1996 09:43:44 +0100 (MET)


From: Jim Lindsey <jlindsey@luc.ac.be>
Message-Id: <9612230843.AA28147@alpha.luc.ac.be>
Subject: R-alpha: glm bugs
To: r-testers@stat.math.ethz.ch (r-testers)
Date: Mon, 23 Dec 1996 09:43:44 +0100 (MET)

y <- rpois(20,5)
x1 <- gl(5,4,20)
x2 <- gl(4,1,20)
glm(y~x1+x2,family=poisson)  #works
glm(y~x1+x2,family=poisson,weights=as.numeric(x2!=1))
Error in numeric(nr): negative length vectors are not allowed.
# but works if a whole row or column is not weighted out
glm(y~x1+x2+as.numeric(x1):as.numeric(x2),family=poisson) #works
glm(y~x1+x2+x1:as.numeric(x2),family=poisson)
Error in numeric(nr): negative length vectors are not allowed.
Jim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-