ggPMX (version 0.9.4)

pmx: Create a pmx object

Description

Create a pmx object from a data source

Create a controller from mlxtran file

Usage

pmx(config, sys = c("mlx", "nm"), directory, input, dv, dvid, cats = NULL,
  conts = NULL, occ = NULL, strats = NULL, settings = NULL,
  endpoint = NULL, sim = NULL, bloq = NULL)

pmx_mlx(config, directory, input, dv, dvid, cats, conts, occ, strats, settings, endpoint, sim, bloq)

pmx_mlxtran(file_name, config = "standing", call = FALSE, endpoint, ...)

Arguments

config

Can be either : The complete path for the configuration file, the name of configuration within the built-in list of configurations, or a configuration object.

sys

the system name can be MLX/NM

directory

character modelling output directory.

input

character complete path to the modelling input file

dv

character the name of measurable variable used in the input modelling file

dvid

[Optional] character observation type parameter. This is mandatory in case of multiple endpoint (PKPD).

cats

[Optional]character vector of categorical covariates

conts

[Optional]character vector of continuous covariates

occ

[Optional]character occasional covariate variable name

strats

[Optional]character extra stratification variables

settings

[Optional]pmxSettingsClass pmx_settings shared between all plots

endpoint

pmxEndpointClass or integer or charcater defalut to NULL of the endpoint code. pmx_endpoint

sim

pmxSimClass default to NULL. pmx_sim

bloq

pmxBLOQClass default to NULL. pmx_bloq

file_name

character mlxtran file path.

call

logical if TRUE the result is the parameters parsed

...

extra arguments passed to pmx_mlx.

Value

pmxClass controller object.

Details

pmx_mlx is a wrapper to mlx for the MONOLIX system ( sys="mlx")

pmx_mlxtran parses mlxtran file and guess pmx_mlx arguments. In case of multi endpoint the first endpoint is selected. You can though set the endpoint through the same argument. When you set call=TRUE,no controller is created but only the parameters parsed by mlxtran. This can be very helpful, in case you would like to customize parameters (adding settings vi pmx_settings, chnag eth edefault endpoint.)

Examples

Run this code
# NOT RUN {
## Example to create the controller using theophylline data
theophylline <- file.path(system.file(package = "ggPMX"), "testdata",
                          "theophylline")
WORK_DIR <- file.path(theophylline, "Monolix")
input_file <- file.path(theophylline, "data_pk.csv")

## using only mandatory variables
ctr <- pmx(
  sys="mlx",
  config = "standing",
  directory = WORK_DIR,
  input = input_file,
  dv = "Y",
  dvid ="DVID"
)
## Using covariates
ctr <- pmx(
  sys="mlx",
  config = "standing",
  directory = WORK_DIR,
  input = input_file,
  dv = "Y",
  dvid ="DVID",
  cats=c("SEX"),
  conts=c("WT0","AGE0"),
  strats="STUD"
)
## using settings parameter
ctr <- pmx(
  sys="mlx",
  config = "standing",
  directory = WORK_DIR,
  input = input_file,
  dv = "Y",
  dvid ="DVID",
  settings=list(is.draft=FALSE)
)

## using mlxtran file
mlxtran_file <- 
  file.path(system.file(package = "ggPMX"), 
    "testdata","1_popPK_model","project.mlxtran")
pmx_mlxtran(mlxtran_file)

## mlxtran , call =TRUE to get the pmx_mlx argument parsed by  pmx_mlxtran
params <- pmx_mlxtran(mlxtran_file,call=TRUE)

str(params)
# $ directory: chr results_pathile 
# $ input    : chr observation file path
# $ dv       : chr "DV"
# $ cats     : chr [1:4] "SEX" "RACE" "DISE" "ILOW"
# $ conts    : chr [1:4] "AGE0" "WT0" "HT0" "TRT"
# $ occ      : chr "ISS"
# $ dvid     : chr "YTYPE"
# $ endpoint :List of 5
# ..$ code     : chr "1"
# ..$ label    : chr ""
# ..$ unit     : chr ""
# ..$ file.code: chr "1"
# ..$ trans    : NULL
# ..- attr(*, "class")= chr "pmxEndpointClass"
# $ config   : chr "standing"
# }

Run the code above in your browser using DataCamp Workspace