Question on semiparametric bootstrap in lme4
Yes, that does look like a bug. Thanks! (Interesting that the bootstrap std dev is about half the size of the parametric std error ... qqmath(fm01) shows that the distribution of residuals is indeed thin-tailed. Fixed on Github (testing now ...) Ben Bolker
On 14-07-22 12:11 AM, Mark Lai wrote:
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
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models