get_number_of_individuals#

pharmpy.modeling.get_number_of_individuals(model)[source]#

Retrieve the number of individuals in the model dataset

Parameters:

model (Model) – Pharmpy model

Returns:

int – Number of individuals in the model dataset

Examples

>>> from pharmpy.modeling import get_number_of_individuals, load_example_model
>>> model = load_example_model("pheno")
>>> get_number_of_individuals(model)
59

Notes

For NONMEM models this is the number of individuals of the active dataset, i.e. after filtering of IGNORE and ACCEPT and removal of individuals with no observations.

See also

get_number_of_observations

Get the number of observations in a dataset

get_number_of_observations_per_individual

Get the number of observations per individual in a dataset