THETA1: "KA (1/h)"
abb: "First order absorption rate constant"
desc: struct
panel: logTrans trans
1 Introduction
When formatting the NONMEM® model output to make report-ready Parameter Tables using the pmparams package, we also need to tell R how to interpret the parameter values.
Here we outline the information expected in the parameter key and the options currently available for interpreting the estimates.
2 Parameter key overview
There are four arguments required for each parameter in the model.
abb
- abbreviation for model parameter (we use latex coding)desc
- parameter description to appear in the tablepanel
- the panel label the parameter should appear undertrans
- definition of how the parameter should be transformed
For example:
The parameter key is usually written in a YAML file: pk-parameter-key.yaml
. The advantage is that, depending how your model development progressed, you could potentially use the same parameter key for the base model, final model and bootstrap model parameter tables.
If you prefer to keep the parameter descriptions with the table code we provide an example of how that works here: pk-final-model-table-no-yml.R
. The only significant difference between a parameter key yaml and data frame is that instead of having the name of the parameters be yaml variables, they are under “name” column.
2.1 Name
For each model parameter, you need to provide the NONMEM® parameter name and number (without any punctuation), for example,
THETA1:
abb:
desc:
panel:
trans
THETA2:
abb:
desc:
panel:
trans
OMEGA11:
abb:
desc:
panel:
trans
SIGMA11:
abb:
desc:
panel: trans
A note on YAML syntax: each item in the YAML file needs a unique descriptor, and for simplicity, we use the model parameter name and number to indicate each new variable. Here the NONMEM® parameter THETA(1)
is under the variable THETA1
. This model parameter name and number must exactly match the NONMEM® name/number (without punctuation) because it is used later to join this parameter key to the NONMEM® output.
2.2 Abbreviation and description
An abbreviation and description of each field should be provided for each model parameter:
- The
abb
field should contain the abbreviation you want to appear in the parameter table. As MetrumRG reports are written in Latex we use latex coding in the abbreviation field. - The
desc
field should be a brief description that appears in the parameter table.
THETA1: "KA (1/h)"
abb: "First order absorption rate constant"
desc
THETA2: "V2/F (L)"
abb: "Apparent central volume"
desc
OMEGA11: "IIV-KA"
abb: "Variance of absorption"
desc
SIGMA11: "Proportional"
abb: "Variance" desc
2.3 Panel options
The report-ready parameter tables split the parameters into key parameter types using panels. The panel
field of the parameter key should contain specific arguments corresponding to the potential panel labels. We include several options the common panel labels (these can easily be expanded as needed):
struct
- “Structural model parameters”cov
- “Covariate effect parameters”IIV
- “Interindividual covariance parameters”IIV
- “Interindividual variance parameters”IOV
- “Interoccasion variance parameters”RV
- “Residual variance”
For example:
THETA1: "KA (1/h)"
abb: "First order absorption rate constant"
desc: struct
panel
THETA2: "V2/F (L)"
abb: "Apparent central volume"
desc: struct
panel
OMEGA11: "IIV-KA"
abb: "Variance of absorption"
desc: IIV
panel
SIGMA11: "Proportional"
abb: "Variance"
desc: RV panel
2.4 Transformations
Model parameters often need to be transformed during model development; the trans
field tells R how to back-transform these parameters for the report-ready table. We again include several options for the common transformation (these can easily be expanded as needed):
none
- untransformed parameters (e.g. THETAs or off-diagonals)logTrans
- THETAs estimated in the log domainlogitTrans
- THETAs estimated using a logit transformlognormalOm
- log-normal OMEGAsOmSD
- OMEGAs where you want to return SD onlylogitOmSD
- OMEGAs using logit transformaddErr
- additive error termspropErr
- proportional error terms
For example:
THETA1: "KA (1/h)"
abb: "First order absorption rate constant"
desc: struct
panel: logTrans
trans
THETA2: "V2/F (L)"
abb: "Apparent central volume"
desc: struct
panel: logTrans
trans
OMEGA11: "IIV-KA"
abb: "Variance of absorption"
desc: IIV
panel: lognormalOm
trans
SIGMA11: "Proportional"
abb: "Variance"
desc: RV
panel: propErr trans
3 Example parameter key
When all parameters have been described in the parameter key YAML file (pk-parameter-key.yaml
), use the file path to the parameter key as an input to the define_param_table
and define_boot_boot_table
pmparams functions.
<- here::here("script", "pk-parameter-key.yaml") key
3.1 Parameter key without a YAML file
If you prefer to keep all parameter table code in a single R file, then you can also define the parameters directly in R. We provide an example of this here: pk-final-model-table-no-yml.R
. The only significant difference between a parameter key yaml and data frame is that instead of having the name of the parameters be yaml variables, they are under “name” column.