summarize_individuals#

pharmpy.modeling.summarize_individuals(models: List[Model]) Optional[Any][source]#

Creates a summary dataframe keyed by model-individual pairs for an input list of models.

Content of the various columns:

Column

Description

outlier_count

Number of observations with CWRES > 5

ofv

Individual OFV

dofv_vs_parent

Difference in individual OFV between this model and its parent model

predicted_dofv

Predicted dOFV if this individual was excluded

predicted_residual

Predicted residual

Parameters:

models (List[Model]) – Input models

Returns:

pd.DataFrame | None – The summary as a dataframe

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> from pharmpy.tools import fit
>>> fit(model)
<Pharmpy model object pheno>
>>> from pharmpy.tools import run_tool 
>>> results = run_tool(
...     'modelsearch',
...     model=model,
...     mfl='ABSORPTION(ZO);PERIPHERALS([1, 2])',
...     algorithm='reduced_stepwise'
... ) 
>>> summarize_individuals([results.start_model, *results.models])