if (FALSE) {
# 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)
}
Run the code above in your browser using DataLab