pmx_nm: Creates pmx controller from NONMEM model outputs

Description Usage Arguments Value Author(s) Examples

View source: R/nonmem_reader.R

Description

Creates pmx controller from NONMEM model outputs

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pmx_nm(
  file = NULL,
  directory = ".",
  runno = NULL,
  ext = ".lst",
  table_suffix = "",
  sim_suffix = "sim",
  simfile = NULL,
  prefix = "run",
  table_names = c("sdtab", "mutab", "patab", "catab", "cotab", "mytab", "extra",
    "xptab", "cwtab"),
  dvid = "DVID",
  pred = "PRED",
  time = "TIME",
  dv = "DV",
  conts,
  cats,
  npde,
  iwres,
  ipred,
  endpoint,
  strats = "",
  settings = pmx_settings(),
  vpc = TRUE,
  bloq = NULL,
  obs = FALSE,
  quiet = FALSE
)

Arguments

file

A character vector of path to the files or a nm_table_list object created with pmx_list_nm_tables.

directory

directory of the model files.

runno

run number which is used for generating the model file name, or used for alternative import of NONMEM-output tables.

ext

Extension to be used to generate model file name. Should be one of'.lst' (default), '.out', '.res', '.mod' or '.ctl' for NONMEM.

table_suffix

suffix of the output tables, standard is "" (no suffix).

sim_suffix

suffix of the simulation output tables, standard is "sim" (e.g. stdab1sim).

simfile

Useful if the simulation is peformed post-hoc and an additional simulation model file is generated e.g. "simulation.lst"; similar to "file" see above.

prefix

Prefix to be used to generate model file name. Used in combination with runno and ext.

table_names

contains the names of the NONMEM-output tables e.g. "sdtab", "patab", "cotab", "catab".

dvid

[Optional] character observation type parameter, mandatory in case of multiple endpoint (PKPD). Standard = "DVID"

pred

[Optional] character specifing variable name of the population prediction (standard ggPMX nomenclautre = "PRED")

time

[Optional] character specifing variable name of time (standard ggPMX nomenclautre = "TIME")

dv

character the name of measurable variable used in the input modelling file (standard ggPMX nomenclautre = "DV")

conts

[Optional] character vector of continuous covariates (automatically detected if "cotab" is provided)

cats

[Optional] character vector of categorical covariates (automatically detected if "catab" is provided)

npde

[Optional] character specifing variable name of the normalized population predictor (standard ggPMX nomenclautre = "NPDE")

iwres

[Optional] character specifing variable name of the individual weighted residuals (standard ggPMX nomenclautre = "IWRES")

ipred

[Optional] character specifing variable name of the individual population prediction (standard ggPMX nomenclautre = "IPRED")

endpoint

[Optional] pmxEndpointClass or integer or charcater default to NULL of the endpoint code. pmx_endpoint

strats

[Optional] character extra stratification variables

settings

pmxSettingsClass pmx_settings shared between all plots

vpc

logical a boolean indiacting if vpc should be calculated, simulation tables are required for VPC generation (by default TRUE)

bloq

pmxBLOQClass default to NULL. pmx_bloq specify bloq, within controller: e.g. bloq=pmx_bloq(cens = "BLOQ_name", limit = "LIMIT_name")

obs

logical if set to TRUE will filter dataset according to "MDV", default is FALSE

quiet

Logical, if FALSE messages are printed to the console.

Value

pmxClass controller object.

Author(s)

The ggPMX NONMEM reader (pmx_nm) is strongly based on NONMEM reading functions of the xpose package (v.0.4.11) (Thanks to Benjamin Guiastrennec) To avoid conflicts with the xpose package, the necessary xpose-based functions have been renamed with a "pmx_" prefix. If the user wants to use individual functions e.g. "read_nm_tables" please use the xpose-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## using only runnumber 
# ctr <- pmx_nm(
#  directory=model_dir,
#  runno = "001" 
#)

## using a model file (e.g. run001.lst)
#ctr <- pmx_nm(
#  directory=model_dir,
#  file = "run001.lst" 
#)

## if simulation was performed post-hoc, an additional simulation file can be loaded for VPC
#ctr <- pmx_nm(
#  directory=model_dir,
#  file = "run001.lst", 
#  simfile = "simulation.ctl"
#)

## loading with individual table(s)-names
#ctr <- pmx_nm(directory = model_dir,
#              runno = 3, 
#              table_names = "xptab")

ggPMX documentation built on Sept. 20, 2021, 5:09 p.m.