Executes an NLME simple estimation

fitmodel(
  model,
  hostPlatform = NULL,
  params,
  simpleTables,
  runInBackground = FALSE,
  ...
)

Arguments

model

PK/PD model class object.

hostPlatform

Host definition for model execution. See NlmeParallelHost. If missing, PhoenixMPIDir64 is given and MPI is installed, MPI local host with 4 threads is used. If MPI is not found, local host without parallelization is used.

params

Engine parameters. See engineParams. If missing, default parameters generated by engineParams(model) are used.

simpleTables

NlmeTableDef class object (or list of class objects). See NlmeTableDef.

runInBackground

Set to TRUE to run in background and return prompt.

...

Additional class initializer arguments for NlmeParallelHost 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 NlmeParallelHost arguments are supplied through both hostPlatform argument and additional argument, then its slots will be overridden by additional arguments.

Value

if runInBackground is FALSE, a list with all main resulted dataframes are returned (Overall, theta, omega, omega_Correlation, omega_Shrinkage, omega_stderr); otherwise current status of job is returned.

See also

Examples

if (FALSE) {

 # Define the host
 host <- NlmeParallelHost(sharedDirectory = Sys.getenv("NLME_ROOT_DIRECTORY"),
                             parallelMethod = NlmeParallelMethod("none"),
                             hostName = "local",
                             numCores = 1)
 # Define the model
 model <- pkmodel(numComp = 2,
                  absorption = "FirstOrder",
                  ID = "Subject",
                  Time = "Act_Time",
                  CObs = "Conc",
                  Aa = "Amount",
                  data = pkData,
                  modelName = "PkModel" )

 # Update fixed effects
 model <- fixedEffect(model,
                     effect = c("tvV", "tvCl", "tvV2", "tvCl2"),
                     value = c(16, 41, 7, 14))

 # Define the engine parameters
 params <- Certara.RsNLME::engineParams(model)

 # Fit model
 res <- fitmodel(model, host, params)
}