[R] predict function problem for glmmPQL

Chun Zhang usamelie at yahoo.com
Fri Jan 23 06:48:47 CET 2009


Hi all,
I am using cross-validation to validate a generalized linear mixed effects model fitted using glmmPQL. i found that the predict function has a problem and i wonder if anyone has encountered the same problem?

glmm1 = glmmPQL(y~aX+b,random=~1|sample,data=traindata)
predict(glmm1,newdata=testdata,level=1,type="response")

gives me all "NA"s. it works for level=0 (the fixed effects), but not for level=1. When i use newdata=traindata, predict function works perfectly. 

i wonder if this is a problem with predict function or it's some bug in my code?

Thanks much for your help!

Chun

Chun Zhang
Statistician at Roche




More information about the R-help mailing list