Description Usage Arguments Details Value Note Author(s)
Calculates size of most recent dose for any NONMEM file that contains dosing records.
1 2 |
data |
data frame containing data in NONMEM format. |
ID_col |
name of column containing patient IDs. |
TIME_col |
name of column containing TIME. |
DOSE_col |
name of the new column that will contain DOSE. |
CMT_vals |
vector of value(s) of CMT for which doses should contribute to the DOSE calculation. If CMT_vals is left as FALSE and a CMT column exists then all doses will contribute to the calculation of DOSE, irrespective of the value of CMT. As an example, you might have oral doses with CMT=1 and IV doses with CMT=2 and you only want the IV doses to register as doses in the DOSE calculation, then set: CMT_vals=2. |
RULES FOR CALCULATION OF DOSE:
DOSE = first non-zero value of AMT (which has CMT within CMT_vals) for all observations before the first dose. Whenever AMT (which has CMT within CMT_vals) changes to a new non-zero value, that becomes the new value of DOSE until AMT (which has CMT within CMT_vals) changes again to a non-zero value.
The input data frame with DOSE added in new column with name DOSE_col.
If a patient has no qualifying dosing records, then DOSE will be set equal to 0 for all records.
Rupert Austin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.