Executes an NLME stepwise covariate search
stepwiseSearch.RdExecutes 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
TRUEto run in background and return prompt.- ...
Additional arguments for
hostParamsor arguments available insideengineParamsfunctions. IfengineParamsarguments are supplied through bothparamsargument and additional argument (i.e., ellipsis), then the arguments inparamswill be ignored and only the additional arguments will be used with warning. IfhostParamsarguments are supplied through both thehostPlatformargument and the ellipses, values supplied tohostPlatformwill 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 = 1,
data = pkData,
ID = "Subject",
Time = "Act_Time",
A1 = "Amount",
CObs = "Conc",
workingDir = tempdir())
# Add Gender covariate of type categorical
model <- addCovariate(model,
covariate = "Gender",
type = "Categorical",
effect = c("V", "Cl"),
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 = "MULTICORE",
hostName = "local",
numCores = 8,
sharedDirectory = tempdir())
# Define the engine parameters
params <- engineParams(model, numIterations = 6)
# 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)
} # }