[R] A suggestion for predict function(s)
Liaw, Andy
andy_liaw at merck.com
Thu Apr 14 02:54:05 CEST 2005
> From: Liaw, Andy
>
> > From: Ross Darnell
> >
> > A good point but what is the value of storing a large set of
> > predicted
> > values when the values of the explanatory variables are lost
> > (predicted
> > values of what?). I thought the purpose of objects was that
> they were
> > self explanatory (pardon the pun).
> >
> > Maybe we could make it optional.
>
> If what you are looking for is a way to track the
> observations, I'd suggest
> simply adding rownames of newdata as names of the predicted
> values. Storing
> names is much cheaper than the entire data frame of
> predictors. (And in R,
> data frames _must_ have unique row names.)
And as a matter of fact, predict.lm() and predict.glm()
(and probably most other predict() methods) already do
that.
Andy
>
> Cheers,
> Andy
>
> > Ross Darnell
> > --
> > Email: <r.darnell at uq.edu.au>
> >
> >
> >
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
> --------------------------------------------------------------
> ----------------
> Notice: This e-mail message, together with any attachments,
> contains information of Merck & Co., Inc. (One Merck Drive,
> Whitehouse Station, New Jersey, USA 08889), and/or its
> affiliates (which may be known outside the United States as
> Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
> Banyu) that may be confidential, proprietary copyrighted
> and/or legally privileged. It is intended solely for the use
> of the individual or entity named on this message. If you
> are not the intended recipient, and have received this
> message in error, please notify us immediately by reply
> e-mail and then delete it from your system.
> --------------------------------------------------------------
> ----------------
>
>
More information about the R-help
mailing list