Runs model_summaries() on all models in the input and returns a subset of the each resulting summary as a tibble.

summary_log(.base_dir, .recurse = TRUE, ...)

add_summary(.log_df, ...)

Arguments

.base_dir

Base directory to look in for models.

.recurse

If TRUE, the default, search recursively in all subdirectories. Passed through to fs::dir_ls() -- If a positive number, the number of levels to recurse.

...

Arguments passed through to model_summaries()

.log_df

a bbi_run_log_df tibble (the output of run_log())

Value

An object of class bbi_summary_log_df, which includes the fields described below. If all model summaries fail, the returned tibble will only contain the absolute_model_path, run, and error_msg columns.

summary_log() creates a new tibble with one row per model found in .base_dir (and subdirectories, if .recurse = TRUE).

add_summary() adds these fields to the tibble passed to .log_df.

Details

The following fields from bbi_nonmem_summary (the output of model_summary()) are extracted and included by default. If you would like more fields from the summary object, you can extract them manually from the bbi_summary list column.

  • error_msg -- Error message from model_summary(). If NULL the call succeeded. If not NULL, the rest of the fields will be NULL.

  • needed_fail_flags -- Logical for whether the call initially failed, but passed with the inclusion of .fail_flags. See model_summaries() docs for more details.

  • bbi_summary -- The full bbi_nonmem_summary object for each row. This can be queried further by extracting it as a list, or by using dplyr::mutate() etc.

  • ofv -- Objective function value with no constant from the final estimation method. The constant, and the value with the constant can be found in $ofv.

  • param_count -- Count of (non-fixed) parameters estimated in final estimation method.

  • estimation_method -- Character vector of estimation method(s) used. Extracted from $run_details.

  • problem_text -- Character vector of text from $PROB. Extracted from $run_details.

  • number_of_patients -- Count of unique patients in the input data set, extracted from $run_details.

  • number_of_obs -- Total count of observations in the input data set, extracted from $run_details.

  • condition_number -- The condition number for the final estimation method, if present.

  • any_heuristics -- Logical indicating whether any of the columns extracted from $run_heuristics are TRUE. Duplicative information, but helpful for filtering.

  • covariance_step_aborted -- Extracted from $run_heuristics.

  • large_condition_number -- TRUE if condition_number > 1000. Extracted from $run_heuristics.

  • correlations_not_ok -- Not currently implemented in bbi; will always be FALSE. Extracted from $run_heuristics.

  • parameter_near_boundary -- Extracted from $run_heuristics.

  • hessian_reset -- Extracted from $run_heuristics.

  • has_final_zero_gradient -- Extracted from $run_heuristics.

  • minimization_terminated -- Extracted from $run_heuristics.

  • eta_pval_significant -- TRUE if any of the ETA p-values are < 0.05. Extracted from $shrinkage_details$pval.

  • prderr -- TRUE if a PRDERR file is present in the output folder.

See also