Run COVsearch tool. For more details, see :ref:covsearch
.
run_covsearch(
search_space,
p_forward = 0.01,
p_backward = 0.001,
max_steps = -1,
algorithm = "scm-forward-then-backward",
results = NULL,
model = NULL,
max_eval = FALSE,
adaptive_scope_reduction = FALSE,
strictness = "minimization_successful or (rounding_errors and sigdigs>=0.1)",
naming_index_offset = 0,
nsamples = 10,
.statsmodels = FALSE,
.weighted_linreg = FALSE,
.lin_filter = 0,
...
)
(COVSearchResults) COVsearch tool result object
(str or ModelFeatures) MFL of covariate effects to try
(numeric) The p-value to use in the likelihood ratio test for forward steps
(numeric) The p-value to use in the likelihood ratio test for backward steps
(numeric) The maximum number of search steps to make
(str) The search algorithm to use. Currently, 'scm-forward' and 'scm-forward-then-backward' are supported.
(ModelfitResults (optional)) Results of model
(Model (optional)) Pharmpy model
(logical) Limit the number of function evaluations to 3.1 times that of the base model. Default is FALSE.
(logical) Stash all non-significant parameter-covariate effects to be tested after all significant effects have been tested. Once all these have been tested, try adding the stashed effects once more with a regular forward approach. Default is FALSE
(str (optional)) Strictness criteria
(numeric (optional)) index offset for naming of runs. Default is 0.
(numeric) Number of samples from individual parameter conditional distribution for linear covariate model selection.
nsamples=0
uses ETAs to for linear model selection, whereas nsample
>=1 generates MCMC samples with an
additional SAEM estimation step. When multiple samples are generated, linear mixed effects model will be
used to fit the linear models.
Default is 10, i.e. generating 10 samples per subject
(logical) Estimation tool for SAMBA linear covariate model fitting. 'TRUE' calls statsmodel's functionalities, whereas 'FALSE' calls nonmem.
(logical) When using nonmem to run linear covariate models, 'TRUE' uses ETC as weight to run WLS.
(numeric) Option to control the number of covariates passed to nonlinear selection
Arguments to pass to tool
if (FALSE) {
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
search_space <- 'COVARIATE(c(CL, V), c(AGE, WT), EXP)'
res <- run_covsearch(search_space, model=model, results=results)
}
Run the code above in your browser using DataLab