On Thu, Jan 22, 2009 at 10:48 PM, Chun Zhang <usamelie at yahoo.com>
wrote:> 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?
...perhaps the levels of 'sample' differ between 'traindata' and
'testdata'?
hth,
Kingsford Jones
>
> Thanks much for your help!
>
> Chun
>
> Chun Zhang
> Statistician at Roche
>
> ______________________________________________
> R-help at 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.
>