nlme: failed augPred with NA in an unused column (PR#1745)
Prof Brian D Ripley
ripley@stats.ox.ac.uk
Fri, 5 Jul 2002 08:06:12 +0100 (BST)
An update was needed for 1.5.x: see file 150update.txt on
developer.r-project.org.
On Fri, 5 Jul 2002 dieter.menne@menne-biomed.de wrote:
> Full_Name: Dieter Menne
> Version: 1.5.1
> OS: win2000
> Submission from: (NULL) (212.185.252.139)
>
>
> nlme Version: 3.1-27
>
> gsummary fails if any of the columns contains an NA.
>
> varying <- unlist(lapply(object, function(column, frst) {
> aux <- as.character(column)
> any(aux != aux[frst])
> }, frst = asFirst))
> >> if (any(varying) && (!invariantsOnly)) {
>
> Error in if (any(varying) && (!invariantsOnly)) { :
> missing value where logical needed
>
> This probably is by design (an more verbose error message would help),
> but as a consequence augPred also fails even if
> the column is not used at all in the fit.
>
> ------------------------------------------------
> library(nlme)
> data(Orthodont)
> # add a column with an NA that is not used in the fit
> Orthodont$Others<-runif(nrow(Orthodont))
> is.na(Orthodont$Others[3])<-T
> fm1 <- lme(Orthodont, random = ~1)
> augPred(fm1, length.out = 2, level = c(0,1))
> --------------------------------------------------
> #Error in if (any(varying) && (!invariantsOnly)) { :
> # missing value where logical needed
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._