mu_reference_model#
- pharmpy.modeling.mu_reference_model(model)[source]#
Convert model to use mu-referencing
Mu-referencing an eta is to separately define its actual mu (mean) parameter. For example: \(CL = \theta_1 e^{\eta_1}\) with \(\eta_1\) following a zero-mean normal distribution would give \(\mu_1 = \log{\theta_1}\) and \(CL = e^{\mu_1 + \eta_1}\)
- Parameters:
model (Model) – Pharmpy model object
- Returns:
Model – Pharmpy model object
Example
>>> from pharmpy.modeling import load_example_model, mu_reference_model >>> model = load_example_model("pheno") >>> model = mu_reference_model(model) >>> model.statements.before_odes TVCL = POP_CL⋅WGT TVV = POP_VC⋅WGT ⎧TVV⋅(COVAPGR + 1) for APGR < 5 ⎨ TVV = ⎩ TVV otherwise μ₁ = log(TVCL) ETA_CL + μ₁ CL = ℯ μ₂ = log(TVV) ETA_VC + μ₂ VC = ℯ V = VC S₁ = VC