add_effect_compartment#
- pharmpy.modeling.add_effect_compartment(model, expr)[source]#
Add an effect compartment.
Implemented PD models are:
Linear:
Emax:
Step effect:
Sigmoidal:
Log-linear:
is the baseline effect- Parameters:
model (Model) – Pharmpy model
expr ({‘linear’, ‘emax’, ‘sigmoid’, ‘step’, ‘loglin’}) – Name of the PD effect function.
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model = add_effect_compartment(model, "linear") >>> model.statements.ode_system.find_compartment("EFFECT") Compartment(EFFECT, amount=A_EFFECT(t), input=KE0*A_CENTRAL(t)/VC)