Rob;
I found an example of how to get confidence intervals for predictions from a GLMM on Ben Bolker's GLMM website - (see the Owls examples http://glmm.wikidot.com/examples ).  As an example, I modified the code to work for a model of wading bird capture rate as a function of group size by species interaction that included a random effect for sample location.  The pvar is the se without the random effect variance, and the tvar adds the variance for the random effect.  phi, plo and thi, tlo are the 95% confidence intervals.  The GLMM website is a treasure trove for help with GLMM.

Global_model.glmer.bin <- glmer(CAPTURES~ group.bin*SPECIES + (1|SAMPLE) , offset = log(seconds/60), family = poisson, data=Heron.data.nz)
#get predictions from model (based on B. Bolker analysis of Zurr owl data)
pframe0 <- with(Heron.data.nz,expand.grid(SPECIES=levels(SPECIES),group.bin=levels(group.bin)))
## construct model matrix
mm <- model.matrix(~group.bin*SPECIES ,data=pframe0)
## predictions from each model; first construct linear predictor, then transform to raw scale
pframe1 <- data.frame(pframe0,eta=mm%*%fixef(Global_model.glmer.bin))
pframe1 <- with(pframe1,data.frame(pframe1,captures.minute=exp(eta)))
pvar1 <- diag(mm %*% tcrossprod(vcov(Global_model.glmer.bin),mm))
tvar1 <- pvar1+VarCorr(Global_model.glmer.bin)$SAMPLE
pframe1 <- data.frame(pframe1,pse=sqrt(pvar1),tse=sqrt(tvar1))
pframe1 <- with(pframe1, data.frame(pframe1, plo=exp(eta-1.96*pse), phi=exp(eta+1.96*pse), tlo=exp(eta-1.96*tse), thi=exp(eta+1.96*tse)))

Hope this helps,
Eric

Eric D. Stolen, Ph.D.
Mail Code: IHA-300
Kennedy Space Center, FL  32899
office: 321-476-4119; cell: 321-480-6799; fax: 321-853-2939; email: eric.d.stolen@nasa.gov<mailto:eric.d.stolen@nasa.gov>

"..in mathematics you don't understand things. You just get used to them."  - John von Neumann

"It is better to have an approximate answer to the right question, than an exact answer to the wrong question." -  John Tukey





	[[alternative HTML version deleted]]

