Literature DB >> 32055542

Development of R packages: 'NonCompart' and 'ncar' for noncompartmental analysis (NCA).

Hyungsub Kim1, Sungpil Han1, Yong-Soon Cho1, Seok-Kyu Yoon1, Kyun-Seop Bae1.   

Abstract

Noncompartmental analysis (NCA) is a primary analytical approach for pharmacokinetic studies, and its parameters act as decision criteria in bioequivalent studies. Currently, NCA is usually carried out by commercial softwares such as WinNonlin®. In this article, we introduce our newly-developed two R packages, NonCompart (NonCompartmental analysis for pharmacokinetic data) and ncar (NonCompartmental Analysis for pharmacokinetic Report), which can perform NCA and produce complete NCA reports in both pdf and rtf formats. These packages are compatible with CDISC (Clinical Data Interchange Standards Consortium) standard as well. We demonstrate how the results of WinNonlin® are reproduced and how NCA reports can be obtained. With these R packages, we aimed to help researchers carry out NCA and utilize the output for early stages of drug development process. These R packages are freely available for download from the CRAN repository.
Copyright © 2018 Translational and Clinical Pharmacology.

Entities:  

Keywords:  NonCompart; R; ncar; noncompartmental analysis (NCA)

Year:  2018        PMID: 32055542      PMCID: PMC6989226          DOI: 10.12793/tcp.2018.26.1.10

Source DB:  PubMed          Journal:  Transl Clin Pharmacol        ISSN: 2289-0882


Introduction

The aim of pharmacokinetic (PK) studies is to examine the kinetics of a drug with regard to absorption, distribution, metabolism and elimination in the body. PK data analysis consists of noncompartmental analysis (NCA) and nonlinear regression analysis.[12] NCA uses the trapezoidal rule for measurement of area under the concentration-time curve (AUC), and requires fewer assumptions than model-based analysis.[2] NCA allows for estimation of various PK parameters such as AUC, peak observed drug concentration (Cmax), time of peak concentration (Tmax), and elimination half-life. Particularly, AUC and Cmax are often accepted as the criteria for approval of bioequivalent drugs. R, a widely-used computer language, is a suite of libraries of statistical and mathematical computations.[3] Despite its relatively small base system compared with other commercial softwares for NCA such as WinNonlin®[4] and Kinetica,[5] R has robust functions for scientific computation and numerous add-in packages for use in various fields.[6] Therefore, many efforts are being made to replace commercial softwares with R packages. In this article, we introduce two newly-developed R packages, NonCompart and ncar, that are compatible with SDTM (Study Data Tabulation Model)-formatted dataset of CDISC (Clinical Data Interchange Standards Consortium), which is the standard of documentation submitted to regulatory authorities,[7] while providing a practical method for producing complete NCA reports.

Methods

R packages (NonCompart and ncar)

Two R packages (NonCompart and ncar) for NCA were developed in the open-source R programming language in order to allow free public use. R packages can be installed and loaded using the following scripts. install.packages(c("NonCompart","ncar")) library(NonCompart) library(ncar) Detailed documentation and examples for each package can be found on the online user manual in the CRAN repository (http://cran.r-project.org/web/packages/NonCompart/index.html, http://cran.r-project.org/web/packages/ncar/index.html) or directly within the R console by entering ?function (e.g.?NonCompart,?ncar). These two packages are implemented in R and can accept a set of input arguments that allow for generation of NCA output. The names of most NCA metrics estimated by the function of these packages are consistent with those used in WinNonlin® (Table 1).
Table 1

Description of PK parameters of WinNonlin® and the R packages

ParameterWinNonlin®Description
b0b0Intercept
CMAXCmaxMax Concentration (Conc)
CMAXDCmax_DMax Conc Norm by Dose
TMAXTmax_DTime of Cmax
TLAGTlagTime Until First Nonzero Conc
CLSTClastLast Nonzero Conc
CLSTPClast_predLast Nonzero Conc Pred
TLSTTlastTime of Last Nonzero Conc
LAMZHLHL_Lambda_zHalf-Life Lambda z
LAMZLambda_zLambda z
LAMZLLLambda_z lowerLambda z Lower Limit
LAMZULLambda_z upperLambda z Upper Limit
LAMZNPTNo_points_Lambda_zNumber of Points for Lambda z
CORRXYCorr_XYCorrelation Between Time X and Log Conc Y
R2RsqR Squared
R2ADJRsq_adjustedR Squared Adjusted
AUCLSTAUClastAUC to Last Nonzero Conc
AUCALLAUCallAUC All
AUCIFOAUCINF_obsAUC Infinity Obs
AUCIFODAUCINF_D_obsAUC Infinity Obs Norm by Dose
AUCIFPAUCINF_PredAUC Infinity Pred
AUCIFPDAUCINF_D_predAUC Infinity Pred Norm by Dose
AUCPEOAUC_Extrap_obsAUC %Extrapolation Obs
AUCPEPAUC_Extrap_predAUC %Extrapolation Pred
AUMCLSTAUMClastAUMC to Last Nonzero Conc
AUMCIFOAUMCINF_obsAUMC Infinity Obs
AUMCIFPAUMCINF_predAUMC Infinity Pred
AUMCPEOAUMC_Extrap_obsAUMC %Extrapolation Obs
AUMCPEPAUMC_Extrap_predAUMC % Extrapolation Pred
VZFOVz_F_obsVz Obs by F
VZFPVz_F_pVz Pred by F
CLFOCl_F_obsTotal CL Obs by F
CLFPCl_F_predTotal CL Pred by F
MRTEVLSTMRTlastMRT Extravasc to Last Nonzero Conc
MRTEVIFOMRTINF_obsMRT Extravasc Infinity Obs
MRTEVIFPMRTINF_predMRT Extravasc Infinity Pred

Software

WinNonlin® (Pharsight, Mountain View, CA, USA)[4] in Microsoft-Windows 7 (64 bit) was used for the computation. R 3.4.2 in Microsoft-Windows 7 (64 bit) was used for the comparison of calculated values.

Dataset

To compare the outputs generated by R packages and WinNonlin®, we used Theoph dataset obtained from the R software. The Theoph dataset has 132 observations from 12 subjects. A portion of the Theoph dataset (subject ID = 8) is shown in Table 2.
Table 2

Part of Theoph dataset with information on key (subject), time, and concentration

SubjectWeight (kg)Dose (mg)Time (h)Concentration (mg/ml)
870.54.5300.00
870.54.530.253.05
870.54.530.523.05
870.54.530.987.31
870.54.532.027.56
870.54.533.536.59
870.54.535.055.88
870.54.537.154.73
870.54.539.054.57
870.54.5312.103.00
870.54.5324.121.25

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.
Figure 1

Example of NonCompart package functions. Example by tblNCA.

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. 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 t1 and t2) 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. 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. Reports generated by pdfNCA( )function show individual plots with trend lines that joins the dots used for calculating terminal slopes. Figure 2 shows an example of an NCA report in pdf format and an individual concentration-time plot.
Figure 2

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).

pdfNCA(fileName = "pdfNCA-Theoph.pdf", Theoph, colSubj = "Subject", colTime = "Time", colConc = "conc", dose = 320, doseUnit = "mg", timeUnit = "h", concU nit = "mg/L", down = "Linear")

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 obtained 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 3 (a randomized subject, Subject ID = 8).
Table 3

Comparison of NCA results generated from WinNonlin® and ncar package

ParameterWinNonlin®ncar
CMAX7.56 mg/L7.5600 mg/L
CMAXD0.023625 mg/L/mg0.0236 mg/L/mg
TMAX2.02 h2.0200 h
TLAG0 h0.0000 h
CLST1.25 mg/L1.2500 mg/L
TLST24.12 h24.1200 h
LAMZHL8.510037883 h8.5100 h
LAMZ0.08145054 /h0.0815 /h
LAMZLL3.53 h3.5300 h
LAMZUL24.12 h24.1200 h
LAMZNPT66
CORRXY−0.995496053−0.9955
R20.9910123910.991
R2ADJ0.9887654890.9888
AUCLST88.55995 h*mg/L88.5600 h*mg/L
AUCALL88.55995 h*mg/L88.5600 h*mg/L
AUCIFO103.906687 h*mg/L103.9067 h*mg/L
AUCIFOD0.324708 h*mg/L/mg0.3247 h*mg/L/mg
AUCIFP103.643051 h*mg/L103.6431 h*mg/L
AUCIFP0.323884 h*mg/L/mg0.3239 h*mg/L/mg
AUCPEO14.77%14.77%
AUCPEP14.55%14.55%
AUMCLST739.534598 h2*mg/L739.5346 h2*mg/L
AUMCIFO1298.115755 h2*mg/L1298.1158 h2*mg/L
AUMCIFP1288.520116 h2*mg/L1288.5201 h2*mg/L
AUMCPEO43.03%43.03%
AUMCPEP42.61%42.61%
VZFO37.81050811 L37.8105 L
VZFP37.90668616 L37.9067 L
CLFO3.079686301 L/h3.0797 L/h
CLFP3.087520055 L/h3.0875 L/h
MRTEVLST8.35066639 h8.3507 h
MRTEVIFO12.49309159 h12.4931 h
MRTEVIFP12.43228656 h12.4323 h
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®.

Discussion

We developed two R packages—NonCompart and ncar for NCA. Through these packages, we aimed to implement the following functionalities for performing NCA: 1) CDISC SDTM terms; 2) automatic slope selection with the same criterion of WinNonlin®; 3) supporting both ‘linear-up linear-down’ and ‘linear-up log-down’ method; and 4) interval (partial) AUCs with ‘linear’ or ‘log’ interpolation method. These packages are convenient and efficient because they enable preparation of data and NCA as well as generation of reports including plots together in R software. As shown in Figure 2B, the NCA plot allows for automatic slope selection, however, it is not possible to manually choose the points used for calculating terminal slope. In addition, any error or change can easily be fixed, and users may choose calculation methods between linear and logarithmic, which support ‘linear-up linear-down’ and ‘linear-up log-down’ method, respectively. Our results showed that our R packages meet the aforementioned objectives. Since the PPTESTCD of SDTM is used in the R packages, it is helpful to construct PP domain. In the present practice, one has to change variables from WinNonlin® one by one, which is an especially difficult task for those without specific knowledge on SDTM. A number of packages can perform NCA, but no package—even commercial softwares—can give outputs in the format of SDTM or receive SDTM-formatted input data. It is important to ensure that the reports are legible to sponsors and regulatory bodies by generating a consistent and systematic result, as well as the exact results of NCA. As shown in Table 3, comparison of NCA results obtained by WinNonlin® and ncar package (including another package) showed no significant discrepancies. These two R packages are fast and easy-to-use tool-set that can successfully perform NCA with concentration–time data. Specifically, the ncar package can produce a comprehensive set of graphical and tabular outputs that summarize the NCA results, which is a complete report in pdf or rtf format. Our two newly-developed packages are free and open-source, so they can be used to develop other useful packages as well. We hope that NonCompart and ncar packages will enable researchers to easily perform NCA, and contribute to facilitation of drug discovery process.
  3 in total

1.  Non-compartmental analysis.

Authors:  Johan Gabrielsson; Daniel Weiner
Journal:  Methods Mol Biol       Date:  2012

2.  A diagnostic tool for population models using non-compartmental analysis: The ncappc package for R.

Authors:  Chayan Acharya; Andrew C Hooker; Gülbeyaz Yıldız Türkyılmaz; Siv Jönsson; Mats O Karlsson
Journal:  Comput Methods Programs Biomed       Date:  2016-02-17       Impact factor: 5.428

3.  Erratum: R-based reproduction of the estimation process hidden behind NONMEM Part 2: First-order conditional estimation.

Authors:  Kyun-Seop Bae; Dong-Seok Yim
Journal:  Transl Clin Pharmacol       Date:  2018-06-18
  3 in total
  3 in total

1.  Comparison of Alternative Population Modeling Approaches for Implementing a Level A IVIVC and for Assessing the Time-Scaling Factor Using Deconvolution and Convolution-Based Methods.

Authors:  Roberto Gomeni; Françoise Bressolle-Gomeni
Journal:  AAPS J       Date:  2020-04-15       Impact factor: 4.009

2.  A High-Throughput Clinical Laboratory Methodology for the Therapeutic Monitoring of Ibrutinib and Dihydrodiol Ibrutinib.

Authors:  Gellért Balázs Karvaly; István Vincze; Alexandra Balogh; Zoltán Köllő; Csaba Bödör; Barna Vásárhelyi
Journal:  Molecules       Date:  2022-07-25       Impact factor: 4.927

3.  Modeling Complex Pharmacokinetics of Long-Acting Injectable Products Using Convolution-Based Models With Nonparametric Input Functions.

Authors:  Roberto Gomeni; Françoise Bressolle-Gomeni
Journal:  J Clin Pharmacol       Date:  2021-03-15       Impact factor: 3.126

  3 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.