[Rd] problem in predict.mlm (PR#1226)

gray@jimmy.harvard.edu gray@jimmy.harvard.edu
Sun, 23 Dec 2001 15:06:44 +0100 (MET)


predict.mlm() does not appear to work properly with newdata specified
(it seems to ignore newdata in my applications).  I suggest replacing

  X <- model.matrix(object, newdata)

with something like 

  X <- model.matrix(delete.response(terms(object)), newdata)

(see the corresponding section in predict.lm()).
--
Bob Gray

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