R-beta: glm bugs
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Wed Dec 17 00:38:41 CET 1997
Jim Lindsey <jlindsey at 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 at 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list