Skip to content

A suggestion for predict function(s)

2 messages · Liaw, Andy, Ross Darnell

#
I must respectfully disagree.  Why carry extra copies of data arround?  This
is probably OK for small to medium sized data, but definitely not for large
data.

Besides, in your example, it may do different things depending on whether
newdata is supplied:  model.matrix is not necessarily the same as the
original data frame.  You need a bit more work to get the right model.matrix
that correspond to the newdata.  It's not clear to me whether you want to
return model matrix or model frame, but in either case it's not sufficient
to just use `newdata'.

Andy
#
Liaw, Andy wrote: