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

From: David Reitter <david.reitter_at_gmail.com>
Date: Thu 02 Feb 2006 - 06:42:26 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 02 06:51:24 2006

This archive was generated by hypermail 2.1.8 : Thu 02 Feb 2006 - 08:29:58 EST