new_bootstrap_run: Create a bootstrap run from an existing model

View source: R/bootstrap-model.R

new_bootstrap_runR Documentation

Create a bootstrap run from an existing model

Description

Creates a new bbi_nmboot_model object, from an existing bbi_nonmem_model object. This function creates a new control stream, that is a copy of .mod with the ⁠$TABLE⁠ and ⁠$COV⁠ records optionally removed (see remove_cov and remove_tables arguments). The object returned from this must then be passed to setup_bootstrap_run() before submission (see examples).

Usage

new_bootstrap_run(
  .mod,
  .suffix = "boot",
  .inherit_tags = TRUE,
  .overwrite = FALSE,
  remove_cov = TRUE,
  remove_tables = TRUE
)

Arguments

.mod

A bbr model object.

.suffix

A suffix for the bootstrap run directory. Will be prefixed by the model id of .mod.

.inherit_tags

If TRUE, the default, inherit any tags from .mod.

.overwrite

If FALSE, the default, function will error if a model file already exists at specified .new_model path. If TRUE any existing file at .new_model will be overwritten silently.

remove_cov, remove_tables

If TRUE, the default, remove ⁠$COVARIANCE⁠ and ⁠$TABLE⁠ records respectively, allowing for notably faster run times.

Value

S3 object of class bbi_nmboot_model.

See Also

setup_bootstrap_run() summarize_bootstrap_run()

Examples

## Not run: 

# Create new bootstrap object
.boot_run <- new_bootstrap_run(.mod)

# Optionally inherit final parameter estimates
.boot_run <- inherit_param_estimates(.boot_run)

# Set up the run
setup_bootstrap_run(.boot_run)

## End(Not run)

metrumresearchgroup/rbabylon documentation built on Sept. 26, 2024, 4:23 p.m.