model_summary.RdCalls out to bbi and returns a named list of class bbi_{.model_type}_summary with model outputs and diagnostics.
model_summary( .mod, .model_type = NULL, .bbi_args = NULL, ..., .dry_run = FALSE, .directory = NULL ) # S3 method for bbi_nonmem_model model_summary( .mod, .model_type = NULL, .bbi_args = NULL, ..., .dry_run = FALSE, .directory = NULL ) # S3 method for character model_summary( .mod, .model_type = c("nonmem", "stan"), .bbi_args = NULL, ..., .dry_run = FALSE, .directory = get_model_directory() ) # S3 method for numeric model_summary( .mod, .model_type = c("nonmem", "stan"), .bbi_args = NULL, ..., .dry_run = FALSE, .directory = get_model_directory() )
| .mod | Model to summarize. Can be a |
|---|---|
| .model_type | String specifying the type of model, either 'nonmem' or 'stan'. Only used when passing a path for |
| .bbi_args | A named list specifying arguments to pass to babylon formatted like |
| ... | args passed through to |
| .dry_run | show what the command would be without actually running it |
| .directory | Model directory which |
NONMEM
The returned list for a NONMEM model will contain the following top-level elements:
run_details
run_heuristics
parameters_data
parameter_names
ofv
shrinkage_details
covariance_theta
correlation_theta
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_cor_file
no_cov_file
no_ext_file
no_grd_file
no_shk_file
If you 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 .bbi_args argument.
For example, if have asked to skip the $COV step, you would call model_summary(..., .bbi_args = list(no_cov_file = TRUE)).
bbi_nonmem_model: Get model summary from bbi_nonmem_model object
character: Get model summary from output directory path
numeric: Get model summary from numeric input.
This will only work if you are calling from the same directory as the models, or if you have set options('rbabylon.model_directory') to the directory constaining the relevant model.