run_estmethod#

pharmpy.tools.run_estmethod(algorithm, methods=None, solvers=None, parameter_uncertainty_methods=None, compare_ofv=True, results=None, model=None, **kwargs)#

Run estmethod tool.

Parameters:
  • algorithm (str) – The algorithm to use (can be ‘exhaustive’, ‘exhaustive_with_update’ or ‘exhaustive_only_eval’)

  • methods (list of {‘FOCE’, ‘FO’, ‘IMP’, ‘IMPMAP’, ‘ITS’, ‘SAEM’, ‘LAPLACE’, ‘BAYES’}, None or ‘all’) – List of estimation methods to test. Can be specified as ‘all’, a list of estimation methods, or None (to not test any estimation method)

  • solvers (str or list of {‘CVODES’, ‘DGEAR’, ‘DVERK’, ‘IDA’, ‘LSODA’, ‘LSODI’} or None) – List of solver to test. Can be specified as ‘all’, a list of solvers, or None (to not test any solver)

  • parameter_uncertainty_methods (str or list of {‘SANDWICH’, ‘SMAT’, ‘RMAT’} or None) – List of parameter uncertainty methods to test. Can be specified as ‘all’, a list of uncertainty methods, or None (to not evaluate any uncertainty)

  • compare_ofv (bool) – Whether to compare the OFV between candidates. Comparison is made by evaluating using IMP

  • results (ModelfitResults) – Results for model

  • model (Model) – Pharmpy mode

  • kwargs – Arguments to pass to tool

Returns:

EstMethodResults – Estmethod tool result object

Examples

>>> from pharmpy.modeling import *
>>> from pharmpy.tools import run_estmethod, load_example_modelfit_results
>>> model = load_example_model("pheno")
>>> results = load_example_modelfit_results("pheno")
>>> methods = ['IMP', 'SAEM']
>>> parameter_uncertainty_methods = None
>>> run_estmethod( 
>>>     'reduced', methods=methods, solvers='all', 
>>>      parameter_uncertainty_methods=parameter_uncertainty_methods, results=results, model=model 
>>> )