run_structsearch#
- pharmpy.tools.run_structsearch(model, results, type, search_space=None, b_init=None, emax_init=None, ec50_init=None, met_init=None, extra_model=None, rank_type='bic', cutoff=None, strictness='minimization_successful or (rounding_errors and sigdigs >= 0.1)', extra_model_results=None, dv_types=None, parameter_uncertainty_method=None, **kwargs)#
Run the structsearch tool. For more details, see Structsearch.
- Parameters:
model (Model) – Pharmpy start model
results (ModelfitResults) – Results for the start model
type (str) – Type of model. Currently only ‘drug_metabolite’ and ‘pkpd’
search_space (str) – Search space to test
b_init (float) – Initial estimate for the baseline for pkpd models.
emax_init (float) – Initial estimate for E_MAX (for pkpd models only).
ec50_init (float) – Initial estimate for EC_50 (for pkpd models only).
met_init (float) – Initial estimate for MET (for pkpd models only).
extra_model (Model) – Optional extra Pharmpy model to use in TMDD structsearch
extra_model_results (ModelfitResults) – Results for the extra model
rank_type ({‘ofv’, ‘lrt’, ‘aic’, ‘bic’}) – Which ranking type should be used. Default is BIC.
cutoff (float) – Cutoff for which value of the ranking function that is considered significant. Default is None (all models will be ranked)
strictness (str or None) – Strictness criteria
dv_types (dict) – Dictionary of DV types for TMDD models with multiple DVs
parameter_uncertainty_method ({‘SANDWICH’, ‘SMAT’, ‘RMAT’, ‘EFIM’} or None) – Parameter uncertainty method. Will be used in ranking models if strictness includes parameter uncertaint
kwargs – Arguments to pass to tool
- Returns:
StructSearchResult – structsearch tool result object
Examples
>>> from pharmpy.modeling import * >>> from pharmpy.tools import run_structsearch, load_example_modelfit_results >>> model = load_example_model("pheno") >>> results = load_example_modelfit_results("pheno") >>> run_structsearch(model=model, results=results, model_type='pkpd')