Re: R-beta: glm bugs
Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
17 Dec 1997 00:38:41 +0100
To: Jim Lindsey <jlindsey@luc.ac.be>
Subject: Re: R-beta: glm bugs
From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Date: 17 Dec 1997 00:38:41 +0100
In-Reply-To: Jim Lindsey's message of Tue, 16 Dec 1997 23:56:26 +0100 (MET)
Jim Lindsey <jlindsey@luc.ac.be> writes:
> Potential users of the glm function in R0.60 should be aware that a
> number of the bug fixes for glm in R0.50 (offsets, aliases, ...) that I
> sent on the list have not been implemented in R0.60. If they want to
> have (more) correct answers with glm, they should consult the archives
> of the list and make the appropriate corrections.
> Jim
Um, the offset fixes HAVE been done, but they seem to have gotten
botched up.
This works:
summary(glm(counts ~ outcome + treatment + offset(outcome==1),
family=poisson()))
This doesn't:
summary(glm(counts ~ outcome + treatment, family=poisson(),
offset=outcome==1))
The glaring bug is in this line in glm():
offset <- model.offset(mf)
... which overrides the optional argument whether or not an offset()
term is present in the model formula. Easily fixed, but which offset
should take precedence if both are specified?
--
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-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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._