run_iivsearch#
- pharmpy.tools.run_iivsearch(algorithm='top_down_exhaustive', iiv_strategy='no_add', rank_type='bic', linearize=False, cutoff=None, results=None, model=None, keep=('CL',), strictness='minimization_successful or (rounding_errors and sigdigs>=0.1)', correlation_algorithm=None, E_p=None, E_q=None, **kwargs)#
Run IIVsearch tool. For more details, see IIVsearch.
- Parameters:
algorithm ({‘top_down_exhaustive’,’bottom_up_stepwise’, ‘skip’}) – Which algorithm to run when determining number of IIVs.
iiv_strategy ({‘no_add’, ‘add_diagonal’, ‘fullblock’, ‘pd_add_diagonal’, ‘pd_fullblock’}) – If/how IIV should be added to start model. Default is ‘no_add’.
rank_type ({‘ofv’, ‘lrt’, ‘aic’, ‘bic’, ‘mbic’}) – Which ranking type should be used. Default is BIC.
linearize (bool) – Wheter or not use linearization when running the tool.
cutoff (float) – Cutoff for which value of the ranking function that is considered significant. Default is None (all models will be ranked)
results (ModelfitResults) – Results for model
model (Model) – Pharmpy model
keep (Iterable[str]) – List of IIVs to keep. Default is “CL”
strictness (str or None) – Strictness criteria
correlation_algorithm ({‘top_down_exhaustive’, ‘skip’} or None) – Which algorithm to run for the determining block structure of added IIVs. If None, the algorithm is determined based on the ‘algorithm’ argument
E_p (float) – Expected number of predictors for diagonal elements (used for mBIC). Must be set when using mBIC and when the argument ‘algorithm’ is not ‘skip’
E_q (float) – Expected number of predictors for off-diagonal elements (used for mBIC). Must be set when using mBIC and when the argument correlation_algorithm is not skip or Non
kwargs – Arguments to pass to tool
- Returns:
IIVSearchResults – IIVsearch tool result object
Examples
>>> from pharmpy.modeling import * >>> from pharmpy.tools import run_iivsearch, load_example_modelfit_results >>> model = load_example_model("pheno") >>> results = load_example_modelfit_results("pheno") >>> run_iivsearch('td_brute_force', results=results, model=model)