Skip to contents

Replicate the bootstrap computations

Usage

replicate_bootstrap(
  number_bootstraps = 999,
  future_seed = TRUE,
  on_error = c("warn", "stop", "keep"),
  ...
)

Arguments

number_bootstraps

The number of bootstraps to perform, default is 999.

future_seed

Seed control forwarded to future.apply::future_lapply(future.seed = ...).

on_error

How failed replicate fits are handled: warn and retain, stop, or keep silently. The original full-data fit must succeed.

...

Additional function arguments to pass to the bootstrap_mars() function.

Value

A list of replicate fits, with original_fit and robust_type attributes.

Details

Whole dependence blocks are sampled. Supplied weights must be positive definite, aligned with original rows, and independent between blocks. Supplied weights for expanded correlation data are unsupported. Fixed-effect factor levels, contrasts and transformed-predictor bases retain their original coordinates. Nonestimable original designs are recorded as failed fits.

Examples

# \donttest{
boot_reps <- replicate_bootstrap(
  number_bootstraps = 5,
  data = teacher_expectancy,
  studyID = "study",
  effectID = NULL,
  sample_size = NULL,
  formula = yi ~ 1,
  variance = "vi",
  varcov_type = "univariate",
  structure = "univariate"
)
#> Warning: Hessian inversion failed: Hessian is singular, indefinite, or numerically unidentified.
# }