Bioequivalence and Bioavailability Forum

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log in |  Register |  Search

Back to the forum  2018-06-22 02:17 CEST (UTC+2h)
daryazyatina
Junior

Ukraine,
2017-07-25 15:12
(edited by daryazyatina on 2017-07-25 15:32)

Posting: # 17608
Views: 1,861
 

 package ncappc in R [R for BE/BA]

Good day, guys!

I have some data about concentration and time of this concentration from the literature data. I want to compare the data from WinNonLin with data from RStudio.
This .csv file I imported in RStudio.
ID,TIME,DV
1,0,0
1,0.33,358
1,0.66,585
1,1,645
1,1.33,792
1,1.66,761
1,2,882
1,2.5,926
1,3,1114
1,3.5,1111
1,4,1070
1,5,752
1,6,557
1,8,351
1,10,222
1,12,137
1,16,83
1,24,52

and this code I used to calculate the pharmacokinetic parameters:
ncappc(obsFile=system.file("extdata","concentrationb2.csv", package = "ncappc"),
       concUnit = "ng/mL",
       timeUnit = "h",
       doseUnit = "g",
       adminType = "extravascular",
       doseType = "ns",
       method = "linear",
       printOut = FALSE,
       psnOut=FALSE,
       noPlot=TRUE,
       LambdaExclude = c(0,0.33,0.66,1,1.33,1.66,2,2.5,3,3.5,4)
      )


I need calculate elimination constant with time points from 5h to 24h.
After all RStudio calculate pharmacokinetic parameters BUT the elimination constant is incorrectly calculated.
What I do wrong?


Edit: Category changed; see also this post #1. [Helmut]
Helmut
Hero
avatar
Homepage
Vienna, Austria,
2017-07-25 17:48

@ daryazyatina
Posting: # 17611
Views: 1,564
 

 package ncappc in R

Hi Darya,

» I want to compare the data from WinNonLin with data from RStudio.
» ncappc(obsFile=system.file("extdata","concentrationb2.csv", package = "ncappc"),
»        concUnit = "ng/mL",
»        timeUnit = "h",
»        doseUnit = "g",
»        adminType = "extravascular",
»        doseType = "ns",
»        method = "linear",
»        printOut = FALSE,
»        psnOut=FALSE,
»        noPlot=TRUE,
»        LambdaExclude = c(0,0.33,0.66,1,1.33,1.66,2,2.5,3,3.5,4)
»       )


I used this code in the R-console

library(ncappc)
ncappc(obsFile="concentrationb2.csv", concUnit="ng/mL",
       timeUnit="h", doseUnit="g", adminType="extravascular",
       doseType="ns", method="linear", printOut=TRUE,
       psnOut=FALSE, noPlot=TRUE,
       LambdaExclude=c(0,0.33,0.66,1,1.33,1.66,2,2.5,3,3.5,4))

and got matching results in Phoenix/WinNonlin 7.0 with its automatic method of selecting the time range for λz (i.e., maximizing R²adj):
                        ncappc    PHX/WNL
AUClast (h*ng/mL)     7645.4250  7645.425
Cmax (ng/mL)          1114.0000  1114
Tmax (h)                 3.0000     3
AUCINF_obs (h*ng/mL)  8315.9994  8315.9994
HL_Lambda_z (h)          8.9386     8.9386

Hence, seemingly the argument LambdaExclude did not work as expected. When I tried LambdaTimeRange=c(5,24) instead, I got:
Error in match(ntime[ntime >= Lambda_z_lower]) :
  argument "table" is missing, with no default


» I need calculate elimination constant with time points from 5h to 24h.

Why do you want to do that?
You would go from a good and reasonable fit (distribution/elimination)

[image]

to a completely wrong one:

[image]

» After all RStudio calculate pharmacokinetic parameters BUT the elimination constant is incorrectly calculated.

In this case it is good that ncappc did not observe your attempts. However, according to the documentation it should be possible to specify a time-range. Contact the authors. Mats Karlsson is a nice guy.

BTW, I strongly recommend to abandon the lousy linear trapezoidal method (positively biased AUC for decreasing concentrations). Better to use the argument method="linear-log" in the future.

Cheers,
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. ☼
Science Quotes
daryazyatina
Junior

Ukraine,
2017-07-26 08:09

@ Helmut
Posting: # 17616
Views: 1,484
 

 package ncappc in R

Thank you, Helmut, for your answer.

» Hence, seemingly the argument LambdaExclude did not work as expected. When I »tried LambdaTimeRange=c(5,24) instead, I got:
» Error in match(ntime[ntime >= Lambda_z_lower]) :
»  argument "table" is missing, with no default

I have the same problems with using LambdaTimeRange=c(5,24), so I used LambdaExclude.

I will write to the authors. I hope they fix this problem.
Back to the forum Activity
 Thread view
Bioequivalence and Bioavailability Forum |  Admin contact
18,413 posts in 3,912 threads, 1,175 registered users;
online 41 (0 registered, 41 guests [including 34 identified bots]).

The greatest shortcoming of the human race is our inability
to understand the exponential function.    Albert Bartlett

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
HTML5 RSS Feed