[R] predict.lme / glmmPQL: "non-conformable arguments"

David Reitter david.reitter at gmail.com
Wed Feb 1 20:42:26 CET 2006


 > I'm trying to use "predict" with a linear mixed-effects logistic
 > regression model fitted with nlmmPQL from the MASS library.
 > Unfortunately, I'm getting an error "non-conformable arguments" in
 > predict.lme, and I would like to understand why.

I'd like to briefly describe how I ended up working around this problem.

The issue is that predict.lme (nlme package) is unhappy when not all  
factor levels actually occur in the data given to it via "newdata".

Therefore I had to add a few dummy data points to the data frame  
given to "predict", containing examples of all factor levels. The  
predictions for these dummies can, of course, later be removed from  
the result. Specifying the possible levels with factor(X, levels=c 
(...)) does NOT do the job.

Thanks to Jonathan Williams, who set me on the right track.




More information about the R-help mailing list