[R-sig-ME] Question on semiparametric bootstrap in lme4

Mark Lai marklhc at gmail.com
Tue Jul 22 06:11:12 CEST 2014


Hi,

I have a question on the semiparametric bootstrap result for lme4. 
Specifically, the bootstrap standard deviation for the fixed effect is 
essentially zero. Here is an example:

 > require(lme4)
 > fm01 <- lmer(Yield ~ 1|Batch, Dyestuff)
 > set.seed(1)
 > require(boot)
 > boo01_sp <- bootMer(fm01, fixef, nsim = 100, use.u = TRUE,
+                  type = "semiparametric")
 > boo01_sp


Call:
bootMer(x = fm01, FUN = fixef, nsim = 100, use.u = TRUE, type = 
"semiparametric")


Bootstrap Statistics :
     original       bias     std. error
t1*   1527.5 9.094947e-13 1.392467e-12

Then I took a look on the source code for the function `bootMer`, and 
found the relevant code:

if (type == "parametric") {
         ss <- simulate(x, nsim = nsim, use.u = use.u, na.action = 
na.exclude)
     }
     else {
         if (use.u) {
             if (isGLMM(x))
                 warning("semiparametric bootstrapping is questionable 
for GLMMs")
             ss <- replicate(nsim, fitted(x) + sample(residuals(x,
                 "response")), simplify = FALSE)
         }
         else {
             stop("semiparametric bootstrapping with use.u=FALSE not yet 
implemented")
         }
     }

I notice that the semiparametric method is using sampling without 
replacement (i.e., `sample(residuals(x, "response"))`, which is 
different from what I learned about bootstrap. Should the `replace = 
TRUE` argument be added?

Mark



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