add_predictions#
- pharmpy.modeling.add_predictions(model, pred)[source]#
Add predictions and/or residuals
Add predictions to estimation step.
- Parameters:
model (Model) – Pharmpy model
pred (list) – List of predictions (e.g. [‘IPRED’, ‘PRED’])
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model.execution_steps[-1].predictions ('CIPREDI', 'PRED') >>> model = add_predictions(model, ['IPRED']) >>> model.execution_steps[-1].predictions ('CIPREDI', 'IPRED', 'PRED')