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