tensfeldt / openNCA

openNCA computation engine is an R package that provides for generation of pharmacokinetic parameter estimates using non-compartmental (NCA) pharmacokinetic analysis methods.
MIT License
27 stars 5 forks source link

AUCTAU and AUMCTAU are not correctly computed when CMIN>0, TAU1 occurs before TLAST, first datapoint occurs at a time >0 #275

Open tensfeldt opened 4 years ago

tensfeldt commented 4 years ago

tc1401_M1SS Observed with commit 86bab62 and commit 5509161

Test case tc1401_M1SS incorporates 2 profiles, SDEID == 1200690330 & 2625313722, that are unusual from other profiles in the testcase in that their times post dose for the first concentration time data point doesn’t occur at zero (0) but rather at 11.5 hours, no datapoint at time of TOLD1 for the first dosing interval, and CMIN is utilized at TOLD1.

The defect appears to occur when CMIN > 0 (zero) and TAU occurs before TLAST for the profile, but the specifics of the trigger have not been verified with additional testing at the time of preparation of this issue submission.

These conditions appear to cause a defect in the computation of AUCTAU1 and AUMCTAU1 (note that this is a single dosing interval test case) and all parameters dependent upon these values.

As an example, for the computation of AUCTAU1 for SDEID==2625313722, the value computed for AUCTAU1 by the computation engine (CE) appears to use the cumulative value from AUC1 rather than AUC2 in computing the cumulative value for AUCTAU1. The alternative calculation in the attached image appears to demonstrate that there’s an indexing issue in the computation engine affecting the correct computation of AUCTAU1.

image

The same issue appears for AUMCTAU1:

image

There is no immediate workaround that can be applied through the system without manual computation.