Package 'Certara.RsNLME.ModelExecutor'

Title: Execute Pharmacometric Models Using 'shiny'
Description: Execute Nonlinear Mixed Effects (NLME) models for pharmacometrics using a 'shiny' interface. Specify engine parameters and select from different run options, including simple estimation, stepwise covariate search, bootstrapping, simulation, visual predictive check, and more. Models are executed using the 'Certara.RsNLME' package.
Authors: James Craig [aut, cre], Mike Talley [aut], Vitalii Nazarov [aut], Certara USA, Inc [cph, fnd]
Maintainer: James Craig <[email protected]>
License: LGPL-3
Version: 3.0.1
Built: 2025-01-08 05:27:31 UTC
Source: https://github.com/cran/Certara.RsNLME.ModelExecutor

Help Index


Run Model Executor from Pirana

Description

Used by Pirana internally to launch the Model Executor Shiny GUI.

Usage

execute_mmdlModel(metamodelFile, hostsfile)

Arguments

metamodelFile

Path to existing metamodel file .mmdl.

hostsfile

Path to hosts definitions file .json. Note, this file is automatically generated by Pirana given the user provided NLME host setup in Pirana settings.

Value

Deploys a Shiny app to execute a Certara.RsNLME model. Returns NULL if assigned to an object.

Examples

if (interactive()) {
# Get existing mmdl file
mmdl_file <- system.file("vignettesdata/OneCpt_IVInfusion.mmdl",
  package = "Certara.RsNLME")

# Create hosts file json. Note, hosts file is automatically created by Pirana.
hosts_file <- tempfile(pattern = "hosts", fileext = ".json")
jsonlite::write_json(
  list(
    list(profile_name = "examplehost", cores_number = 1, os = "Windows", parallel_mode="None")),
  auto_unbox = TRUE, 
  path = hosts_file
  ) 
execute_mmdlModel(
  mmdl_file, 
  hosts_file
  )
}

Run Model Executor

Description

Used to execute a model developed in Certara.RsNLME from a Shiny GUI.

Usage

modelExecutorUI(
  model,
  hosts,
  wd,
  outputfile = "shiny_dirs.txt",
  metamodelFileName = "temp.mmdl",
  fromPirana = FALSE
)

Arguments

model

Model object generated from Certara.RsNLME.

hosts

One or more hosts generated from Certara.RsNLME::hostParams(). If missing, the default local host will be used.

wd

Working directory where the model output folders will be created. If missing, the directory specified in the model object will be used model@modelInfo@workingDir.

outputfile

Text file providing a list of model output subfolders generated inside wd during the Shiny session. Only applicable for Pirana.

metamodelFileName

Name of the resulting metamodel to generate. Only applicable for Pirana.

fromPirana

Logical; set to TRUE when launching app from Pirana.

Value

Deploys a Shiny app to execute a Certara.RsNLME model. Returns NULL if assigned to an object.

Examples

if (interactive()) {
model <- Certara.RsNLME::pkmodel(
  parameterization = "Clearance",
  absorption = "Intravenous",
  numCompartments = 2,
  data = Certara.RsNLME::pkData,
  ID = "Subject",
  A1 = "Amount",
  Time = "Act_Time",
  CObs = "Conc",
  modelName = "pk_model")


modelExecutorUI(model)

}