run_bootstrap: Run bootstrap on an MxModel

View source: R/model_misc.R

run_bootstrapR Documentation

Run bootstrap on an MxModel

Description

It allows running boostrap and saving it to a cache file. If the cache file already exists, it will load the bootstrapped model from cache. It can run in chunks giving an update when each chunk is finished. It measures the time needed to process one chunk and gives an estimation of the total execution time.

Usage

run_bootstrap(
  model,
  cache_file = character(0),
  N = 500,
  force = FALSE,
  by_chunk = TRUE,
  chunk_size = 100
)

Arguments

model

MxModel

cache_file

a character vector indicating the cache file (.rds)

N

number of bootstrap samples

force

force bootstrap regardless of whether the cache file exists

by_chunk

run the bootstrap in chunks

chunk_size

the size of one chunk

Value

MxModel

Note

The bootstrap is only supported for the models with the real (raw) data


IvanVoronin/TwinAnalysis documentation built on July 24, 2024, 9:36 p.m.