[R-sig-ME] bootMer: 2 questions about generating standard errors in lme4

Jeffrey Evans jeff at jeffreyevans.org
Fri Aug 15 17:48:06 CEST 2014


Hi all,

I am trying to generate standard errors for the predicted values from a 
binomial GLMM in lme4. There have been a number of posts about using 
bootMer to accomplish this, but the obtuse language in the help file and 
in these posts continues to befuddle me, and the responses often seem 
tailored to specific cases (e.g. 
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2013q3/020663.html). 
My questions are:

(1) Could someone please help tailor a response for my specific case?
(2) Can bootMer be run in parallel on a multi-core windows machine? I 
found some code fragments on the web from Ben Bolker that appear to 
attempt this using snow, but it doesn't seem to be implemented in the 
current version of lme4. http://ms.mcmaster.ca/~bolker/misc/bootMer_min.Rout

My model has one fixed categorical effect (site), and random effects for 
the experimental unit (ID) and year (Year):

     m1 = glmer(cbind(S,F) ~ site + (1|ID) + (1|Year), 
data=dat,family="binomial")

where S and F are the numbers of successes and failures, respectively 
and year is coded as a factor.

I want marginal predictions for each site, which I can generate with the 
predict function, but how do I get standard errors for those predictions 
which incorporate variance due to year?

# generate marginal predictions
pred = 
predict(m1,newdata=data.frame(site=unique(dat$site)),REform=NA,type="response")

# are these options correct?
predSE = bootMer(m1, predict, use.u=T,type="parametric",nsim = 
10,.progress="txt")

I'm not sure how to choose use.u and type or whether just using predict 
as the function is sufficient. In a past comment, Ben Bolker talked 
about using FUN=predict vs. FUN=sumulate, but I'm not sure what the 
difference is. 
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2013q3/020663.html

What if I want the predictions back-transformed to the data scale (i.e. 
as probabilities)?

Any guidance is appreciated.

Many thanks,
Jeff Evans



More information about the R-sig-mixed-models mailing list