system_define_cohorts_nm {ubiquity}R Documentation

Define Cohorts from NONMEM Input File

Description

This function allows the user to define cohorts automatically from a NONMEM dataset

Usage

system_define_cohorts_nm(
  cfg,
  DS = "DSNAME",
  col_ID = "ID",
  col_CMT = "CMT",
  col_DV = "DV",
  col_TIME = "TIME",
  col_AMT = "AMT",
  col_RATE = "RATE",
  col_EVID = "EVID",
  col_GROUP = NULL,
  filter = NULL,
  INPUTS = NULL,
  OBS = NULL
)

Arguments

cfg

ubiquity system object

DS

Name of the dataset loaded using system_load_data

col_ID

Column of unique subject identifier

col_CMT

Compartment column

col_DV

Column with observations or ’.’ for input

col_TIME

Column with system time of each record

col_AMT

Infusion/dose amounts (these need to be in the same units specified in the system.txt file)

col_RATE

Rate of infusion or ’.’ for bolus

col_EVID

EVID (0 - observation, 1 dose)

col_GROUP

Column name to use for defining similar cohorts when generating figures.

filter

List used to filter the dataset or NULL if the whole dataset is to be used (see filter rules or nm_select_records or a description of how to use this option)

INPUTS

List mapping input information in the dataset to names used in the system.txt file

OBS

List mapping obseravation information in the dataset to nams used in the system.txt file

Details

NOTE: to use this function it is necessary that a timescale be define for the system time scale. For example, if the system time scale was days, something like the following is needed:

<TS:days> 1

Include all records in the dataset

filter = NULL

Include only records matching the following filter

filter = list()
filter$COLNAME = c()

Mapping information:

The inputs mapping information (INPUTMAP) is alist with a field for each type of input: input:

From a coding perspective it looks like this:

INPUTMAP = list()
INPUTMAP$bolus$SPECIES$CMT_NUM            =  1
INPUTMAP$infusion_rates$RATE$CMT_NUM      =  1
INPUTMAP$covariates$CVNAME$col_COV        = 'CNAME'

The observation mapping information (OBSMAP) is a list with elements for each output as described in for system_define_cohort. Each output is a list with the following names:

From a coding perspective it looks like this:

OBSMAP = list()
OBSMAP$ONAME=list(variance     = 'PRED^2',
                 CMT          =  1,
                 output       = '<O>',
                 missing      =  NULL )

Value

ubiquity system object with cohorts defined.

See Also

Estimation vignette (vignette("Estimation", package = "ubiquity"))


[Package ubiquity version 2.0.3 Index]