| 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 |
col_ID |
Column of unique subject identifier |
col_CMT |
Compartment column |
col_DV |
Column with observations or |
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 |
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 |
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:
-
bolusList with a name for each bolus state in the dataset (<B:?>): each bolus name should have aCMT_NUMfield indicating the compartment number for that state -
infusion_ratesList with a name for each rate in the dataset (<R:?>): each rate name should have aCMT_NUMfield indicating the compartment number for that state -
covariatesList with for each covariate in the dataset (<CV:?>): each covariate name should have acol_COVindicating the column in the database that contains that covariate
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:
variance Variance model for this output
CMT Compartment number mapping observations for this output
output Name of the output (
<O>) corresponding with the observationsmissing Value indicating a missing observation or
NULL
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"))