From ripley@stats.ox.ac.uk  Mon Aug  7 22:41:50 2000
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Mon, 7 Aug 2000 22:41:50 +0100 (BST)
Subject: [Rd] predict.lm is broken in 1.1.0-patched (2000-August-7)
 (PR#627)
In-Reply-To: <x2og34232n.fsf@blueberry.kubism.ku.dk>
Message-ID: <Pine.GSO.4.05.10008072237330.18074-100000@auk.stats>

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#627)
Prof Brian D Ripley