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

2020-09-02 tc1510-1 M1SD partial AUCs including an NA concentration not generated #265

Closed jhhughes256 closed 4 years ago

jhhughes256 commented 4 years ago

Issue

When running tc1510-1 M1SD partial AUCs including a concentration time which corresponds with a NA concentration results in an NA partial AUC. Desired behaviour would be for interpolation/extrapolation to occur as appropriate if a valid number for KEL is present.

Output shown below for two profiles. The first profile has NA for KEL and so partial AUC with extrapolation cannot be computed (correct behaviour).

The second profile has a value for KEL and extrapolation still occurs when asking for an interval that goes beyond the last NA value, 72. Example partial AUC being AUC0_168 (correct behaviour).

However interpolation/extrapolation does not occur for values greater than the last non-NA value, 24, but less than the last NA value, 72. The affected partial AUCs are AUC8_48 & AUC0_64. (issue)

knitr::kable(r[is.na(r$CONC12),c(grep("^KEL", names(r)), grep("^AUC\\d+\\_\\d+$", names(r)), grep("^CON.+\\d+$", names(r)))])
KEL KELC0 KELTMLO KELTMHI KELNOPT KELR KELRSQ KELRSQA KELU AUC0_7 AUC8_48 AUC0_64 AUC0_168 CONC1 CONC2 CONC3 CONC4 CONC5 CONC6 CONC7 CONC8 CONC9 CONC10 CONC11 CONC12 CONC13 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
16 NA NA NA NA 0 NA NA NA 1/HR 76.618006 NA NA NA 0 10.90 13.40 10.60 9.14 9.79 14.100 7.850 5.31 3.690 2.720 NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
37 0.030207 0.5966886 16 24 2 1 1 -Inf 1/HR 6.872102 NA NA 14.74803 0 1.01 1.16 1.17 1.13 1.21 0.976 0.785 0.55 0.368 0.289 NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
jhhughes256 commented 4 years ago

This issue is resolved. These two profiles have NA values for AUC8_48 and AUC0_64 due to FLGACCEPTKEL == 0.