powered by
Bootstrap a subset of an lme4 model
subBoot(merMod, n = NULL, FUN, R = 100, seed = NULL, warn = FALSE)
a data.frame of parameters extracted from each of the R replications. The original values are appended to the top of the matrix.
a valid merMod object
the number of rows to sample from the original data in the merMod object, by default will resample the entire model frame
the function to apply to each bootstrapped model
the number of bootstrap replicates, default is 100
numeric, optional argument to set seed for simulations
logical, if TRUE, warnings from lmer will be issued, otherwise they will be suppressed default is FALSE
This function allows users to estimate parameters of a large merMod object using bootstraps on a subset of the data.
# \donttest{ (fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)) resultMatrix <- subBoot(fm1, n = 160, FUN = thetaExtract, R = 20) # }
Run the code above in your browser using DataLab