I believe there is a coding error in the first part of predict.mlm in the splines package, but perhaps someone could explain the logic to me if I'm wrong. I don't see how the second if (missing(newdata)) could ever be true. (I would show the code but I'm using email on a different machine than R today.) Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Yes, it can't at present be used. But that is not a coding error, rather future-proofing for when se=TRUE is implemented. On Tue, 25 Jun 2002, Paul Gilbert wrote:> I believe there is a coding error in the first part of predict.mlm in the > splines package, but perhaps someone could explain the logic to me if I'm wrong.^^^^^^^ Now, that really is a coding error: it is in package base.> I don't see how the second if (missing(newdata)) could ever be true. (I would > show the code but I'm using email on a different machine than R today.)-- Brian D. Ripley, ripley at 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-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Paul Gilbert <pgilbert at bank-banque-canada.ca> writes:> I believe there is a coding error in the first part of predict.mlm in the > splines package, but perhaps someone could explain the logic to me if I'm wrong. > I don't see how the second if (missing(newdata)) could ever be true. (I would > show the code but I'm using email on a different machine than R today.)It seems that you're right, unless one wants to claim that it isn't a bug just that some code is never activated... function (object, newdata, se.fit = FALSE, ...) { if (missing(newdata)) return(object$fitted) if (se.fit) stop("The 'se.fit' argument is not yet implemented for mlm objects") if (missing(newdata)) { X <- model.matrix(object) offset <- object$offset } else { tt <- terms(object) ... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._