thomas@biostat.washington.edu
2000-Aug-07 19:58 UTC
[Rd] predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#627)
On 7 Aug 2000, Peter Dalgaard BSA wrote:> ripley@stats.ox.ac.uk writes: > > > predict.lm has been broken by recent changes to the patched branch. > > > > It fails for all singular fits. An example:<snip>> Sometimes the fix for one bug uncovers another. We have > > > coef.aov > function (object, ...) > { > z <- object$coef > z[!is.na(z)] > } > > coef.lm > function (object, ...) > object$coefficientsOk, this explains it. I *did* test it with a singular fit, but only with lm(), not with aov(). coef.lm seems a more sensible convention, since it's a lot easy to remove the NAs than to add them. -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2000-Aug-07 21:06 UTC
[Rd] predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#627)
thomas@biostat.washington.edu writes:> > > coef.aov > > function (object, ...) > > { > > z <- object$coef > > z[!is.na(z)] > > } > > > coef.lm > > function (object, ...) > > object$coefficients > > Ok, this explains it. I *did* test it with a singular fit, but only with > lm(), not with aov(). > > coef.lm seems a more sensible convention, since it's a lot easy to remove > the NAs than to add them.I've committed a fix for predict.lm to use object$coefficients directly, but I haven't done anything with the coef() methods. -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._