pmx | R Documentation |
Create a pmx object from a data source
pmx(
config,
sys = "mlx",
directory,
input,
dv,
dvid,
cats = NULL,
conts = NULL,
occ = NULL,
strats = NULL,
settings = NULL,
endpoint = NULL,
sim = NULL,
bloq = NULL,
id = NULL,
time = NULL,
sim_blq = NULL
)
pmx_mlx(
config,
directory,
input,
dv,
dvid,
cats,
conts,
occ,
strats,
settings,
endpoint,
sim,
bloq,
id,
time,
sim_blq
)
pmx_mlxtran(
file_name,
config = "standing",
call = FALSE,
endpoint,
version = -1,
...
)
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 "mlx" (for Monolix 2016) or "mlx18" (for Monolix 2018/19 and later) |
directory |
|
input |
|
dv |
|
dvid |
[Optional] |
cats |
[Optional] |
conts |
[Optional] |
occ |
[Optional] |
strats |
[Optional] |
settings |
[Optional] |
endpoint |
|
sim |
|
bloq |
|
id |
[Optional] |
time |
[Optional] |
sim_blq |
|
file_name |
|
call |
|
version |
|
... |
extra arguments passed to pmx_mlx. |
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.)
pmxClass
controller object.
## 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"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.