IQnca contains a range of examples that are included in the examples folder of the installed library.
The folder can be conveniently copied to another directory by the function
examples_IQnca. The default path to
which the example material is copied is ~/IntiQuan/IQnca. Note that the working directory is also changed
to this directory.
## IQnca documentation example material copied to: ~/IntiQuan/IQnca ## Working directory set to: ~/IntiQuan/IQnca
The following examples showcase some of the features the
IQnca package has to offer. For each individual example, the data contains a different combination of administration and profile type, and also the AUC calculation method varies.
- Example 1 is a simple introductory analysis, using the “Extravascular_Repeat_Dose” data.
- Example 2 shows listings, tables and figures, using the “IV_Bolus_Single_Dose” data.
- Example 3 handles LLOQ values, using the, using the “IV_Infusion_Single_Dose” data.
4.1 Example 1
The first example is a simple case study of an analysis. The dataset used is an intravascular bolus single dose data which can be found in
examples/03_book_examples/Example_1/IV_Bolus_Single_Dose.xls. The data stems from a study X where the drug A was administered intravascularly to a group of 4 subjects. The drug was given as a 10000 ug bolus dose. The given time unit is “Minutes”, the dosing unit is “ug” and the concentration was measured in “ng/mL”.
In this analysis the NCA parameters are calculated by an AUC determined is calculated in a linear manner on increasing parts of the concentration curve and in a logarithmic manner on decreasing parts of the curve. Additionally, the AUCs of the time intervals [0,6] and [0,12] are calculated.
4.1.1 Original data
As a first step, import the source dataset:
The contents of this dataset (15 first rows) are shown below.
##  4
##  1
IQdataNCA function is used to create an
IQdataNCA object which is a dataframe. A preliminary step is to modify the original dataset according to the IQnca specification. The names of existing relevant columns need to be mapped to column names given by the specification. Furthermore, required columns which are missing from the dataset need to be added manually, provided such information exists. Table 3.1 (or calling
dataSpec_IQdataNCA()) gives information on the necessary columns to build a minimally functioning example.
Columns in the original dataset which do not have a counterpart in the specification may simply be ignored.
## Renaming columns of the original dataset and adding additional information data <- data.frame( USUBJID = dataOrig$Subject, STUDYID = "Study X", COMPOUND = "Drug A", ANALYTE = "Drug A", MATRIX = "Plasma", PROFILE = "Single Bolus Dose (SD)", PROFTYPE = "SD", GROUP = "10000 ug", GROUPN = 10000, GROUPU = "ug", DAY = NA, ATIME = NA, NTIME = as.numeric(dataOrig$Time), TIMEUNIT = "Minutes", ACONC = as.numeric(dataOrig$Conc), CONCUNIT = "ng/mL", LLOQ = 0, # Faking LLOQ ADM = "Bolus", DOSE = as.numeric(dataOrig$Dose), DOSEUNIT = "ug", stringsAsFactors = FALSE )
In this example the columns
ID,TIME,CONC,DOSE from the source dataset were mapped to
4.1.2 IQdataNCA object
IQdataNCA gives the user the ability to make individual choices about the AUC calculation method, the interpolation method and the handling of records with concentration values below the lower limit of quantification. In this example the AUC on increasing parts of the concentration curve is calculated by the linear trapezoidal method, and for decreasing parts the logarithmic trapezoidal rule is used (see section 6.6). Similarly, interpolation on increasing parts is done by linear rule and on decreasing parts by logarithmic rule. By setting the parameter FLAGTIME as “nominal” the TIME data from the original dataset is taken as nominal time.
Furthermore, by giving a character string of intervals in the parameter AUCINVAL, the AUC on those intervals may be returned.
For more detailed information about the functionality of
IQdataNCA refer to chapter 5.
An example of special handling of blloq values is shown in Example 2.
A first exploratory look into the data can be made by using the
plot.IQdataNCA function. This plotting function is best used for data exploration; for reporting a different function is used. Individual plots show the individual profiles in different panels. The observation points are overlaid with labels, indicating the number of the sample (column IX in the
IQdataNCA object). These plots allow to assess potential outliers and to select points that should be considered for slope calculation (if manual selection is desired). Plots are produced both on a linear and log Y axis.
188.8.131.52 Data cleaning
By the visualisation of the data it is revealed that Subject 2 possesses an implausible outlier. The plot enumerates each record by the column IX which simplifies the removal of the outlier.
184.108.40.206 Manual slope selection
The terminal slope for each subject is initially calculated by the best-slope algorithm. The slope parameters are automatically included in the
In this example the slope points for the first subject will be manually selected and the manual slope calculation is previewed with
## Determining slope based on provided points in IXslope
The slope parameters with the desired slope points are then recalculated in the
IQdataNCA object by the
# slope_manual_NCA generates list entries. One list entry per subject, in this example there is only a single subject manualslope <- list(slope_manual_NCA(USUBJID = "1",IXslope = c(5,7:10))) # Recalculate the slope parameters and include them in the IQdataNCA object dataNCA <- slope_IQdataNCA(data = dataNCA, manualslope = manualslope)
The new slope parameters for Subject 1:
A summary table can give greater insight into the data and the associated statistics by calling the
## Profile | Number subjects | Number samples ## --------------------------------------------------------- ## Single Bolus Dose (SD) | 4 | 39
4.1.3 Parameter calculation and IQnca object
dataNCA is an
IQdataNCA object which can be used for the NCA parameter calculation. It is the input for the function
nca_IQdataNCA which calculates the NCA parameters.
IQncaobject which is a dataframe containing all calculated PK parameters.
IQnca object can displayed by calling the
4.2 Example 2
The dataset for the second example is an intravascular infusion single dose data which can be found in
examples/03_book_examples/Example_2/IV_Infusion_Single_Dose.xls. The data stems from a study Y where the drug B was administered intravascularly by a single infusion dose with a dosing of 300 mg/m2 to 3 subjects and 400mg/m2 to 2 subjects. The given time unit is “Hours”, the dosing unit is “mg” and the concentration was measured in “ug/mL”.
In this example the AUC is determined by using the linear trapezoidal method on the curve before Tmax and the logarithmic trapezoidal method for the part after Tmax. Possible interpolation is done by using the linear or logarithmic rule, on the respective parts of the curve.
The contents of this dataset (15 first rows) are shown below.
##  5
##  2
Like in example 1, augment the original dataset according to the
IQnca specification in the same manner and rename it to
data (not shown here).
# Also add manually the actual duration of the infusion # which is not included in the dataset # (see the "Dosing_Used.xls" dataset in the same folder) data$ADUR[data$USUBJID==1] <- 1.83 data$ADUR[data$USUBJID==2] <- 2.17 data$ADUR[data$USUBJID==3] <- 2.07 data$ADUR[data$USUBJID==4] <- 2.67 data$ADUR[data$USUBJID==5] <- 3.67 data$ADUR[data$USUBJID==6] <- 2.5
4.2.1 BLQ data handling
The lower limit of quantification (LLOQ) in this example is 5 ug/mL. In the source dataset all concentrations lower than that are marked with “BLQ”, as can be seen in the table above. This needs to be amended before the
IQdataNCA function is applied. Replace all such entries with a desired value smaller than the LLOQ.
IQdataNCA function provides multiple options for handling LLOQ data. In this example, BLQ values before the first time above the LLOQ are set to LLOQ/2, BLQ values in the middle are left as is, and trailing BLQ values are set to zero.
The chosen AUC calculation method is “Linear Log”.
4.2.2 Data plots
IQdataNCA objects can be plotted in several ways. While the
plot.IQdataNCA function is useful for data exploration, for reporting more sophisticated plotting functions are being used. The plots then are directly exported as PDF files for easier viewing.
220.127.116.11 Summary level plots
Summary level plots show the data in the same plots. Both on linear and log Y axis and both untransformed and dose-normalized. For each GROUP and PROFILE, a separate plot is created. In this example there are two dosing groups and a single profile. Stratification by various columns of the data is expressed by the coloring of the curves. In the following example the spaghetti plot is stratified by USUBJID.
The horizontal dashed line in the figure above marks the LLOQ. Another example, where we stratify by SEX, leaving the y-axis in original scale and dose-normalize the concentration.
Note that the plots can be stratified by all categorical columns of the dataset, not just covariates. this is not certain –>
( The stratified columns can contain categorical or continuous data, but doing the latter is only recommended if there is a small finite number of unique values in the column. Obviously, the plots cannot be stratified by time and concentration.)
18.104.22.168 Individual plots
Individual plots show the individual profiles in different panels. Plots are produced both on a linear and log Y axis.
22.214.171.124 Mean plots
Mean plots show binned mean and geometric mean plots with and without standard errors on linear and log Y axis. For each group, defined by a different entry in the GROUP column, a line is plotted. Below, both mean and geometric mean plots are shown.
4.3 Example 3
The pharmacokinetics of the drug candidate QWQ4242 following multiple doses were investigated in a single-arm study STD-0815. 10 mg of QWQ4242 was given once daily for one week to 10 healthy indiviuduals. PK profiles in plasma were monitored on Day 1 and after the last dose on Day 7. For Day 1, the profile was obtained for the dosing interval whereas the Day 7 profile monitored the washout up to one week after the last dose.
To investigate and compare the PK characteristics after first dose and at the assumed steady-state, an NCA is conducted for both profiles. The AUC is to be calculated based on linear trapezoidal rule before the maximum concentration and based on logatithmic trapezoidal rule afterwards. The standard settings for BLQ handling are applied.
The PK data is provided in the IQncaData input format, i.e., all required columns for importing the data as
IQRdataNCA are prepared.
USUBJID STUDYID COMPOUND ANALYTE MATRIX PROFILE PROFTYPE GROUP 1 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral 2 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral 3 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral 4 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral 5 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral 6 1 STD-0815 QWQ4242 QWQ4242 Plasma First dose FD 10mg_OD_Oral GROUPN GROUPU DAY ATIME NTIME TIMEUNIT ACONC CONCUNIT LLOQ ADM 1 10 mg 1 0.0000 0.0000 Hours 0.3689 ng/mL 1 EXTRAVASCULAR 2 10 mg 1 0.1667 0.1667 Hours 24.2235 ng/mL 1 EXTRAVASCULAR 3 10 mg 1 1.0000 1.0000 Hours 74.1386 ng/mL 1 EXTRAVASCULAR 4 10 mg 1 2.0000 2.0000 Hours 134.2214 ng/mL 1 EXTRAVASCULAR 5 10 mg 1 4.0000 4.0000 Hours 131.8492 ng/mL 1 EXTRAVASCULAR 6 10 mg 1 8.0000 8.0000 Hours 75.9524 ng/mL 1 EXTRAVASCULAR DOSE DOSEUNIT TAU 1 10 mg 24 2 10 mg 24 3 10 mg 24 4 10 mg 24 5 10 mg 24 6 10 mg 24
Such, the input dataset can readily be imported by
IQdataNCA for analysis preparation, i.e., defining the analysis setting in the data set. The summary function provides an overview over the number of
subjects and observations for each profile. Here, the numbers reported are as expected.
Profile | Number subjects | Number samples ---------------------------------------------------- First dose | 10 | 90 Steady-state dose | 10 | 120
The exploratory plots show the individual profiles. No obvious outlier is visible, but for subject 1 the slope for the steady-state profile with washout could not be determined precisely.
## Determining slope based on provided points in IXslope ## Determining slope based on provided points in IXslope ## Determining slope based on provided points in IXslope ## Determining slope based on provided points in IXslope
As the exploratory data analysis indicates that