update_initial_individual_estimates#

pharmpy.modeling.update_initial_individual_estimates(model, individual_estimates, force=True)[source]#

Update initial individual estimates for a model

Updates initial individual estimates for a model.

Parameters:
  • model (Model) – Pharmpy model to update initial estimates

  • individual_estimates (pd.DataFrame) – Individual estimates to use

  • force (bool) – Set to False to only update if the model had initial individual estimates before

Returns:

Model – Pharmpy model object

Example

>>> from pharmpy.modeling import load_example_model, update_initial_individual_estimates
>>> from pharmpy.tools import load_example_modelfit_results
>>> model = load_example_model("pheno")
>>> results = load_example_modelfit_results("pheno")
>>> ie = results.individual_estimates
>>> model = update_initial_individual_estimates(model, ie)