
Calculate change in objective function value of models in a run log
Source:R/summary-log.R
add_dofv.RdExtend a run log with a "dofv" column that reports the difference in objective function value between the row's model and a reference model.
Arguments
- .log_df
A
bbi_run_log_dftibble (as output byrun_log()orsummary_log()).- .mod_ref
The reference model to use when calculating the change in objective function value for each model in the run log. By default, the reference model is each model's parent (as identified by the first item returned by
get_based_on()). Pass abbi_nonmem_modelobject to use its objective function value as the reference value for all calculations.
Value
The .log_df data frame with a new "dofv" column. If .log_df is
not a summary log, an "ofv" column is also added for context.
Details
To help the caller avoid making comparisons that are not meaningful, the "dofv" value is reported as NA if any of the following is true:
the final estimation methods (as reported in the final "#METH:" line of the
.lstfile) of the model and reference model are not identical .the final estimation method is one for which the objective function value is not meaningful for model comparison (e.g., SAEM or Bayesian methods).
the input data sets of the two models differs, as indicated by a different file path or different number of observations recorded in the
.lstfiles.The above criteria serve to flag the common cases where the models use different input data. Note, however, that models may have used different data despite having a matching data path and number of observations.