if (FALSE) {
# Define the model
model <- pkmodel(numCompartments = 2,
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("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
host <- hostParams(parallelMethod = "MULTICORE",
hostName = "local",
numCores = 8,
sharedDirectory = tempdir())
# Define the engine parameters
params <- engineParams(model, fastOptimization = TRUE, numIterations = 7)
# Define covariate model
cp <- covariateModel(model)
# Perform shotgun search
OverallDF <- shotgunSearch(model = model,
hostPlatform = host,
params = params,
covariateModel = cp,
runInBackground = FALSE)
}
Run the code above in your browser using DataLab