Generate parametric bootstrap replicates of a statistic for a nested linear mixed-effects model.

# S3 method for merMod
parametric_bootstrap(model, .f, B, .refit = TRUE)

# S3 method for lme
parametric_bootstrap(model, .f, B, .refit = TRUE)

parametric_bootstrap(model, .f, B, .refit = TRUE)

Arguments

model

The model object you wish to bootstrap.

.f

A function returning the statistic(s) of interest.

B

The number of bootstrap resamples.

.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 TRUE.

Value

The returned value is an object of class "lmeresamp".

Details

The parametric bootstrap simulates bootstrap samples from the estimated distribution functions. That is, error terms and random effects are simulated from their estimated normal distributions and are combined into bootstrap samples via the fitted model equation.

References

Chambers, R. and Chandra, H. (2013) A random effect block bootstrap for clustered data. Journal of Computational and Graphical Statistics, 22, 452--470.

Van der Leeden, R., Meijer, E. and Busing F. M. (2008) Resampling multilevel models. In J. de Leeuw and E. Meijer, editors, Handbook of Multilevel Analysis, pages 401--433. New York: Springer.

See also