I have a problem using augPred from the nlme package on a data set with NAs.

Consider this example, modified from the augPred help page:

> library(nlme)
> Orthodont[100,]$age=NA     #### Insert NA somewhere in the data set
> fm1 <- lme(Orthodont, random = ~1,na.action=na.exclude)  #### Can still fit 
> with lme
> augPred(fm1)    #### Error...!? Also with options "na.rm=T" or  
> "na.action=na.exclude"
Error in if (from == to) rep.int(from, length.out) else as.vector(c(from,  : 
  missing value where TRUE/FALSE needed

Any help on how to handle NAs in such cases is most appreciated. Neither 
Pinheiro & Bates nor Google helped...

Thanks,
Morten Pedersen

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to