get_observation_expression#

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

Get the full symbolic expression for the observation according to the model

This function currently only support models without ODE systems

Parameters:

model (Model) – Pharmpy model object

Returns:

Expression – Symbolic expression

Examples

>>> from pharmpy.modeling import load_example_model, get_observation_expression
>>> model = load_example_model("pheno_linear")
>>> expr = get_observation_expression(model)
>>> print(expr.unicode())
D_EPSETA1_2⋅EPS₁⋅(ETA₂ - OETA₂) + D_ETA1⋅(ETA₁ - OETA₁) + D_ETA2⋅(ETA₂ - OETA₂) + EPS₁⋅(D_EPS1 + D_EPSETA1_1⋅(ETA₁ - OETA₁)) + OPRED