add_iiv#
- pharmpy.modeling.add_iiv(model, list_of_parameters, expression, operation='*', initial_estimate=0.09, eta_names=None)[source]#
Adds IIVs to
pharmpy.model
.Effects that currently have templates are:
Additive (add)
Proportional (prop)
Exponential (exp)
Logit (log)
Rescaled logit (re_log)
For all except exponential the operation input is not needed. Otherwise user specified input is supported. Initial estimates for new etas are 0.09.
Assuming a statement
, IIVs are added in the following ways:Additive:
Proportional:
Exponential:
Logit:
Rescaled logit:
with
- Parameters:
model (Model) – Pharmpy model to add new IIVs to.
list_of_parameters (str, list) – Name/names of parameter to add new IIVs to.
expression (str, list) – Effect/effects on eta. Either abbreviated (see above) or custom.
operation (str, list, optional) – Whether the new IIV should be added or multiplied (default).
initial_estimate (float) – Value of initial estimate of parameter. Default is 0.09
eta_names (str, list, optional) – Custom name/names of new eta
- Returns:
Model – Pharmpy model object
Example
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model = remove_iiv(model, "CL") >>> model = add_iiv(model, "CL", "add") >>> model.statements.find_assignment("CL") CL = ETA_CL + TVCL
See also