Skip to contents

Bootstrapping is done by resampling all rows corresponding to a resampled ID to work with both long and wide format data without reshaping.

Usage

compute_bootstrap_serial(data, ids, estimation_function, estimation_arguments)

compute_bootstrap_parallel(
  data,
  ids,
  estimation_function = estimation_function,
  estimation_arguments = estimation_arguments,
  n_cores = 1,
  use_load_balancing = FALSE,
  required_packages = character(0)
)

Arguments

data

A data.frame containing the data to be analyzed. A column named .id indicates which observations correspond to each individual.

ids

A vector of IDs to resample from data

estimation_function

A function whose arguments include a data.frame named data

estimation_arguments

A list of any additional arguments needed by estimation_function

n_cores

Scalar number of cores to use.

use_load_balancing

Logical scalar: Should load balancing be used?

required_packages

A character vector of required packages: extracted from the control argument to calculate_covariance()

Value

A vector containing the results of estimation_function evaluated on each bootstrap replicate of data contained in the columns of ids

See also

calculate_covariance() for computing the covariance matrix of estimators across analyses, monitored_analysis_control for details about the default computing arguments.

Examples

# to be added