model_summaries: Summarize multiple models in batch

View source: R/model-summaries.R

model_summariesR Documentation

Summarize multiple models in batch

Description

Run multiple model_summary() calls in batch. Note: if you need to pull in only the parameter estimates for a large number of NONMEM models, consider using param_estimates_batch() instead, as it will be faster than model_summaries() for this purpose.

Usage

model_summaries(
  .mods,
  .bbi_args = NULL,
  .fail_flags = NULL,
  ...,
  .dry_run = FALSE
)

## S3 method for class 'list'
model_summaries(
  .mods,
  .bbi_args = NULL,
  .fail_flags = NULL,
  ...,
  .dry_run = FALSE
)

## S3 method for class 'bbi_run_log_df'
model_summaries(
  .mods,
  .bbi_args = NULL,
  .fail_flags = NULL,
  ...,
  .dry_run = FALSE
)

Arguments

.mods

The model objects to summarize. Could be a bbi_run_log_df tibble, or a list of ⁠bbi_{.model_type}_model⁠ objects.

.bbi_args

A named list specifying arguments to pass to bbi formatted like list("nm_version" = "nm74gf_nmfe", "json" = T, "threads" = 4). See print_bbi_args() for full list of options.

.fail_flags

Same as .bbi_args except these are used only when a model_summary() call fails. In that case, flags are appended to anything in .bbi_args and the summary is tried again. See details section for more info on these flags.

...

args passed through to bbi_exec()

.dry_run

show what the command would be without actually running it

Details

The summary call will error if it does not find certain files in the output folder. However, you can override this behavior with the following file-specific flags:

  • no_ext_file

  • no_grd_file

  • no_shk_file

If some of your runs are using an estimation method that does not produce any of the following files, or they are missing for some other legitimate reason, pass the appropriate flags through the .fail_flags argument.

Additionally, if you have renamed your .ext file, you will need to pass the new name through, to .bbi_args or .fail_flags like so: model_summaries(..., .bbi_args = list(ext_file = "whatever_you_named_it"))

Value

All dispatches will return a list of ⁠bbi_{.model_type}_summary⁠ objects.

Methods (by class)

  • model_summaries(list): Summarize a list of ⁠bbi_{.model_type}_model⁠ objects.

  • model_summaries(bbi_run_log_df): Takes a bbi_run_log_df tibble and summarizes all models in it.

See Also

model_summary(), summary_log(), param_estimates_batch()


metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.