Skip to content

predict.lme / glmmPQL: "non-conformable arguments"

1 message · David Reitter

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