R: Bootstrap a subset of an lme4 model

subBoot {merTools} | R Documentation

## Bootstrap a subset of an lme4 model

### Description

Bootstrap a subset of an lme4 model

### Usage

    subBoot(merMod, n = NULL, FUN, R = 100, seed = NULL)

### Arguments

`merMod` | a valid merMod object
`n` | the number of rows to sample from the original data in the merMod object, by default will resample the entire model frame
`FUN` | the function to apply to each bootstrapped model
`R` | the number of bootstrap replicates, default is 100
`seed` | numeric, optional argument to set seed for simulations

### Details

This function allows users to estimate parameters of a large merMod object using bootstraps on a subset of the data.

### Value

a data.frame of parameters extracted from each of the R replications. The original values are appended to the top of the matrix.

### Examples

    ## Not run:
    (fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy))
    resultMatrix <- subBoot(fm1, n = 160, FUN = thetaExtract, R = 20)

    ## End(Not run)

[Package merTools version 0.3.0 Index]