set_estimation_step#
- pharmpy.modeling.set_estimation_step(model, method, idx=0, **kwargs)[source]#
Set estimation step
- Sets estimation step for a model. Methods currently supported are:
FO, FOCE, ITS, LAPLACE, IMPMAP, IMP, SAEM, BAYES
- Parameters:
model (Model) – Pharmpy model
method (MethodType) – estimation method to change to
idx (int) – index of estimation step, default is 0 (first estimation step)
kwargs – Arguments to pass to EstimationStep (such as interaction, evaluation)
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> opts = {'NITER': 1000, 'ISAMPLE': 100} >>> model = set_estimation_step(model, 'IMP', evaluation=True, tool_options=opts) >>> model.execution_steps[0] EstimationStep('IMP', interaction=True, parameter_uncertainty_method='SANDWICH', evaluation=True, ..., tool_options=...