-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path30-results.Rmd
77 lines (61 loc) · 4.33 KB
/
30-results.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Results
## NonCompart package: performance of NCA
This package conducts NCA as similarly as possible to the most widely used commercial PK analysis software.
The NonCompart package has two main functions, tblNCA and sNCA, for use in multiple subjects and one subject, respectively.
Figure 1 shows an example of output by tblNCA. The input data for tblNCA() should be in a long format as exemplified by the Theoph dataset.
It is possible to input several keys such as subject demographics and information regarding dose, period, or sequence; the result of tblNCA() will print the key columns and the carried keys can be further used for additional statistical analysis (i.e. descriptive statistics, bioequivalence test, t-test, or ANOVA).
The adm argument can be 'Extravascular', 'Bolus', or 'Infusion' and the down argument can be either 'Linear' or 'Log'.
The greatest advantage of this package is that the outputs produced by this package are compatible with those of pharmacokinetic parameter (PP) TESTCD of CDISC SDTM.
```r
tblNCA(Theoph, key = "Subject", colTime = "Time", colConc = "conc", dose = 320,
adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "mg/L",
down = "Linear")
```
IntAUC() function calculates interval (partial) AUC (from t 1 and t 2 ) with the given series of time and concentration.
The interval AUC (0.5–11 hour) of the subject 8 can be calculated using the Theoph dataset with the following R script.
```{r}
Time = Theoph[Theoph$Subject == 8, "Time"]
Concentration = Theoph[Theoph$Subject == 8, "conc"]
Res = sNCA(Time, Concentration,dose = 320, concUnit = "mg/L")
IntAUC(Time, Concentration, t1 = 0.5, t2 = 11, Res)
```
<!-- # [1] 58.26022 -->
## ncar package: generation of NCA reports
This package generates complete NCA reports including plots
with both linear and logarithmic scale. Its two main functions
are pdfNCA and rtfNCA, which produce pdf file format
and rtf file format, respectively. The generated reports are
similar to those generated from commercial softwares, but like
NonCompart, this package has the advantage of using PPTESTCD of CDISC SDTM. ncar produces NCA reports through
NonCompart and converts them into Microsoft Word format
when using rtfNCA( ), which is convenient for editing. Re-
ports generated by pdfNCA( )function show individual plots
with trend lines that joins the dots used for calculating terminal
slopes. Figure \@ref(fig:figure2) 2 shows an example of an NCA report in pdf for-
mat and an individual concentration-time plot.
```{r, message = FALSE}
ncar::pdfNCA(fileName = "pdfNCA-Theoph.pdf", Theoph, key = "Subject",
colTime = "Time", colConc = "conc", dose = 320, doseUnit = "mg",
timeUnit = "h", concUnit = "mg/L", down = "Linear")
```
```{r, include = FALSE}
system('magick -density 300 pdfNCA-Theoph.pdf[22] assets/pdfNCA-1.png')
system('magick -density 300 pdfNCA-Theoph.pdf[23] assets/pdfNCA-2.png')
system('magick -density 300 pdfNCA-Theoph.pdf[24] assets/pdfNCA-3.png')
```
```{r figure2, fig.cap = 'Examples of ncar package functions. (A) Example of a NCA report in pdf format by pdfNCA, (B) Individual concentration-time plots (left: linear scale, right: log-linear scale).', echo = FALSE, include = FALSE}
include_graphics(c('assets/pdfNCA-1.png'))
```
## Validation of NCA results between R packages and WinNonlin®
To demonstrate the accordance of outputs by ncar package and
WinNonlin®, we performed NCA using Theoph dataset ob-
tained from the R software. For comparison of the NCA results,
we selected the following conditions: extravascular, linear-up
linear-down, and best fit. We found no discrepancy between the
two results as shown in Table \@ref(tab:table2) (a randomized subject, Subject
ID = 8).
```{r table3, echo = FALSE}
kable(read_csv('data-raw/table-3.csv'), caption = 'Comparison of NCA results generated from WinNonlin and ncar package', booktabs = TRUE)
```
In order to further validate these packages, we compared NCA results using Indometh, another available dataset of the R software as well as other datasets of a number of subjects from several phase 1 clinical trials with different dosing routes such as infusion, bolus, and oral route.
As a result, we could not find any discrepancy between outputs generated by the R packages and WinNonlin®. ^[A validation report is also available at https://github.com/asancpt/NonCompart-tests]