get_individual_parameters#

pharmpy.modeling.get_individual_parameters(model, level='all', dv=None)[source]#

Retrieves all individual parameters in a pharmpy.model.

By default all individual parameters will be found even ones having no random effect. The level arguments makes it possible to find only those having any random effect or only those having a certain random effect. Using the dv option will give all individual parameters affecting a certain dv. Note that the DV for PD in a PKPD model often also is affected by the PK parameters.

Parameters:
  • model (Model) – Pharmpy model to retrieve the individuals parameters from

  • level ({‘iiv’, ‘iov’, ‘random’, ‘all’}) – The variability level to look for: ‘iiv’, ‘iov’, ‘random’ or ‘all’ (default)

  • dv (Union[Expr, str, int, None]) – Name or DVID of dependent variable. None for all (default)

Returns:

list[str] – A list of the parameter names as strings

Example

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> get_individual_parameters(model)
['CL', 'VC']
>>> get_individual_parameters(model, 'iiv')
['CL', 'VC']
>>> get_individual_parameters(model, 'iov')
[]