[R-sig-ME] meaning of the use.u argument in bootMer and simulateMerMod
Ben Bolker
bbolker at gmail.com
Sat Jun 23 22:24:01 CEST 2012
Simon Chamaillé-Jammes <s.chamaille at ...> writes:
> recently I've been doing parametric boostrapping of glmer models (using
> simulate/refit) to get confidence intervals for both fixed effect and
> variance estimates.
>
> Yesterday I updated to the latest lme4 release on rforge, and discovered
> (did I overlook it before?) the use.u argument in the bootMer function
> (which is actually used in the simulateMerMod function called by
> bootMer).
I *think* it's been there for some time, and you just haven't
noticed it?
>
> in bootMer the definition of the use.u argument (default is FALSE) is:
>
> logical, indicating, if the spherized random effects should be
> simulated / bootstrapped as well. If FALSE, they are not changed, and
> all inference is conditional on these.
>
> in simulateMerMod its definition (default is FALSE) is:
>
> (logical) generate new random-effects values (FALSE) or generate a
> simulation condition on the current random-effects estimates (TRUE)?
>
> Despite these explanations I don't quite get what's actually done and
> I'm feeling uneasy about what should be done when bootstrapping to
> produce confidence intervals for variance estimates. So far I have
> implicitly used the default use.u = FALSE. All examples found on various
> discussion/help lists seem to happily avoid this issue, maybe rightly I
> don't know.
>
> Any clarification, and answer on am I doing it right or not, would be
> welcome.
There's definitely some confusion and inconsistency between the
documentation in both places (?bootMer and ?simulate.merMod); rather
than charging in and fixing everything immediately, I will have to
have some conversation with the primary developers to make sure that
I've got everything right ...
Bottom line: you're not being dumb, there are some messy/wrong
bits in there. For now, look carefully at the *code* to see what's
going on.
I would be inclined to do _unconditional_ simulations (i.e.
resampling the random effects); I don't, however, know offhand
of any good references on the implications of doing it one way
or the other (obviously the conditional simulations will give
less variability/less conservative estimates of confidence intervals).
> PS1/ If one use bootMer to perform semi-parametric bootstrapping and
> use.u is TRUE (the only option for now with semi-par. bootstrap), then
> residuals are randomly permuted and added to the fitted values.
Yes.
> PS2/ I believe what I'm asking here is related and similar to what was
> asked here:
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q4/005049.html
> which wasn't replied to (at least on the list).
>
> PS3/ for my personal knowledge, I would be glad to get a hint on what
> "spherized" random effects mean - google was of no help on this (which
> somehow makes me feel good at times...)
"Spherized" means a form of the random effects that are uncorrelated
and where all observations have equal variance (so that the points
would fall in a (hyper)sphere in multidimensional space. This is discussed
under the rubric "spherical" in the introductory chapter of Doug
Bates's book.
>
> PS4/ for those interested, usage of use.u = TRUE with observation-level
> random effect or nested random effects is problematic, ie. does not run:
> you get things like:
> Error in dim(val) <- c(n, nsim) :
> dims [product 164] do not match the length of object [123]
> In addition: Warning message:
> In etasim.fix + etasim.reff :
> longer object length is not a multiple of shorter object length
Yes indeed (although I'm not 100% sure of the pattern --
I think it may not require nested random effects to break). Will fix!
thanks for your patience,
Ben Bolker
More information about the R-sig-mixed-models
mailing list