Executes an NLME stepwise covariate search
stepwiseSearch.Rd
Executes an NLME stepwise covariate search
Usage
stepwiseSearch(
model,
hostPlatform = NULL,
params,
covariateModel,
stepwiseParams,
runInBackground = FALSE,
...
)
Arguments
- model
PK/PD model class object.
- hostPlatform
Host definition for model execution. See
hostParams
. Ifmissing
, multicore local host with 4 threads is used.- params
Engine parameters. See
engineParams
. Ifmissing
, default parameters generated by engineParams(model) are used.- covariateModel
Covariate Effects Model providing the relationship between covariates and structural parameters to test (
covariateModel(model)
).- stepwiseParams
Stepwise parameters defining decision tree. See
StepwiseParams
- runInBackground
Set to
TRUE
to run in background and return prompt.- ...
Additional arguments for
hostParams
or arguments available insideengineParams
functions. IfengineParams
arguments are supplied through bothparams
argument and additional argument (i.e., ellipsis), then the arguments inparams
will be ignored and only the additional arguments will be used with warning. IfhostParams
arguments are supplied through both thehostPlatform
argument and the ellipses, values supplied tohostPlatform
will be overridden by additional arguments supplied via the ellipses e.g.,...
.
Value
if runInBackground = FALSE
, a data frame is returned with
stepwise search results, i.e. "Overall" comma separated file.
Otherwise the StepwiseNlmeJob
class object is returned.
Examples
if (FALSE) { # \dontrun{
# Define the model
model <- pkmodel(numCompartments = 2,
data = pkData,
ID = "Subject",
Time = "Act_Time",
A1 = "Amount",
CObs = "Conc")
# Add Gender covariate of type categorical
model <- addCovariate(model,
covariate = "Gender",
type = "Categorical",
effect = c("V2", "Cl2"),
levels = c(0, 1),
labels = c("Female", "Male"))
# Add Bodyweight covariate of type continuous
model <- addCovariate(model,
covariate = "BodyWeight",
type = "Continuous",
direction = "Backward",
center = "Mean",
effect = c("V", "Cl"))
# Define the host
defaultHost <- hostParams(parallelMethod = "None",
hostName = "local",
numCores = 1)
# Define the engine parameters
params <- engineParams(model)
# Define covariate model
cp <- covariateModel(model)
# Define the stepwise parameters
sp <- StepwiseParams(0.01, 0.001, "-2LL")
# Perform stepwise search
OverallDF <- stepwiseSearch(model = model,
hostPlatform = defaultHost,
params = params,
covariateModel = cp,
stepwiseParams = sp,
runInBackground = FALSE)
} # }