wild_bootstrap.lmerMod | R Documentation |
Generate wild bootstrap replicates of a statistic for a linear mixed-effects model.
## S3 method for class 'lmerMod' wild_bootstrap( model, .f, B, hccme = c("hc2", "hc3"), aux.dist = c("mammen", "rademacher", "norm", "webb", "gamma"), .refit = TRUE ) ## S3 method for class 'lme' wild_bootstrap( model, .f, B, hccme = c("hc2", "hc3"), aux.dist = c("mammen", "rademacher", "norm", "webb", "gamma"), .refit = TRUE ) wild_bootstrap(model, .f, B, hccme, aux.dist, .refit = TRUE)
model |
The model object you wish to bootstrap. |
.f |
A function returning the statistic(s) of interest. |
B |
The number of bootstrap resamples. |
hccme |
either |
aux.dist |
one of |
.refit |
a logical value indicating whether the model should be refit to
the bootstrap resample, or if the simulated bootstrap resample should be
returned. Defaults to |
The wild bootstrap algorithm for LMEs implemented here was outlined by Modugno & Giannerini (2015). The algorithm is outlined below:
Draw a random sample equal to the number of groups (clusters) from an auxillary distribution with mean zero and unit variance. Denote these as w_1, …, w_g.
Calculate the selected heteroscedasticity consistent matrix estimator for the marginal residuals, \tilde{v}_i
Generate bootstrap responses using the fitted equation: y_i^* = X_i β + \tilde{v}_i w_j
Refit the model and extract the statistic(s) of interest.
Repeat steps 2-4 B times.
The returned value is an object of class "lmeresamp".
Modugno, L., & Giannerini, S. (2015). The Wild Bootstrap for Multilevel Models. Communications in Statistics – Theory and Methods, 44(22), 4812–4825.
Examples are given in bootstrap
parametric_bootstrap
, resid_bootstrap
,
case_bootstrap
, reb_bootstrap
,
wild_bootstrap
for more details on a specific bootstrap.
bootMer
in the lme4 package for an
implementation of (semi-)parametric bootstrap for mixed models.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.