stepwiseSearch.Rd
Executes an NLME stepwise covariate search
stepwiseSearch(
model,
hostPlatform = NULL,
params,
covariateModel,
stepwiseParams,
runInBackground = FALSE,
...
)
PK/PD model class object.
Host definition for model execution. See hostParams
.
If missing
, multicore local host with 4 threads is used.
Engine parameters. See engineParams
.
If missing
, default parameters generated by engineParams(model) are used.
Covariate Effects Model providing the relationship
between covariates and structural parameters to test (covariateModel(model)
).
Stepwise parameters defining decision tree.
See StepwiseParams
Set to TRUE
to run in background and return prompt.
Additional arguments for hostParams
or arguments available inside engineParams
functions.
If engineParams
arguments are supplied through both params
argument
and additional argument (i.e., ellipsis), then the arguments in params
will be ignored
and only the additional arguments will be used with warning.
If hostParams
arguments are supplied through both the hostPlatform
argument and the ellipses, values supplied to hostPlatform
will be overridden by
additional arguments supplied via the ellipses e.g., ...
.
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.
if (FALSE) {
# 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)
}