From ripley@stats.ox.ac.uk  Mon Aug  7 22:41:49 2000
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Mon, 7 Aug 2000 23:41:49 +0200 (MET DST)
Subject: [Rd] predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#628)
Message-ID: <200008072141.XAA03887@pubhealth.ku.dk>

On 7 Aug 2000, Peter Dalgaard BSA wrote:

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

As far as I recall coef.aov is different for easier compatibility with S
output: coef.lm is definitely not compatible.  I think there should
probably be a distinction between the raw information in the object and the
information given by the coef accessor function, and each has its place.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


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


[Rd] predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#628)
ripley@stats.ox.ac.uk