add_iov#
- pharmpy.modeling.add_iov(model, occ, list_of_parameters=None, eta_names=None, distribution='disjoint')[source]#
Adds IOVs to
pharmpy.model
.Initial estimate of new IOVs are 10% of the IIV eta it is based on.
- Parameters:
model (Model) – Pharmpy model to add new IOVs to.
occ (str) – Name of occasion column.
list_of_parameters (str, list) – List of names of parameters and random variables. Accepts random variable names, parameter names, or a mix of both.
eta_names (str, list) – Custom names of new etas. Must be equal to the number of input etas times the number of categories for occasion.
distribution ({‘disjoint’, ‘joint’, ‘explicit’, ‘same-as-iiv’}) – The distribution that should be used for the new etas. Options are ‘disjoint’ for disjoint normal distributions, ‘joint’ for joint normal distribution, ‘explicit’ for an explicit mix of joint and disjoint distributions, and ‘same-as-iiv’ for copying the distribution of IIV etas.
- Returns:
Model – Pharmpy model object
Example
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model = add_iov(model, "TIME", "CL") >>> model.statements.find_assignment("CL") CL = ETA_CL + TVCL
See also