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-08-28 tc1590_M1SD INCLUDEINTERPOLATION controls not working as expected or consistently. #261

Closed TomTensfeldt closed 4 years ago

TomTensfeldt commented 4 years ago

No issues noted with extrapolation. However there is a bug with Inclusion/Exclusion of interpolation. For 44 out of the 48 profiles in the dataset, behavior is as expected, but there is a problem with some AUC results for 4 profiles where interpolation is required.

Please review attached document for details. tc1590_Deviation_Summary_28Aug2020.docx

jhhughes256 commented 4 years ago

This comment provides an example of the behaviour of the CE with commit cca452d for reference.

Include interpolation and extrapolation

No issues with commit cca452d

knitr::kable(head(oldData[,c(1, grep("^AUC\\d+_\\d+$", names(oldData)), grep("^CONCTIME\\d+$", names(oldData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 98.11387 63.098301 65.724934 36.732628 7.3711403 6.4956227 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 24.74776 15.219666 16.092465 8.411666 2.3810272 2.0219357 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 15.22506 15.17522 6.130309 6.720872 2.296925 0.0535589 0.0566612 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 23.68840 23.82780 12.812288 13.719644 6.291580 0.3397483 0.3787301 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 47.45846 47.69749 19.245042 21.009201 7.445251 0.1791732 0.1901194 11.044250 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 3189.45272 832.210865 907.337515 361.931940 44.3411132 37.0634435 546.902894 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include extrapolation, exclude interpolation

Issues with commit cca452d. 4 profiles have values reported for AUC0_64, 60_100 and 60_124 when they should be missing as they include interpolated timepoints 60 and 64.

knitr::kable(head(oldData[,c(1, grep("^AUC\\d+_\\d+$", names(oldData)), grep("^CONCTIME\\d+$", names(oldData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 NA 62.309949 NA 98.11387 63.098301 NA 36.732628 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 NA 15.775430 NA 24.74776 15.219666 NA 8.411666 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 NA 9.248423 15.22506 15.17522 6.130309 NA 2.296925 0.0535589 0.0566612 NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 NA 16.115864 23.68840 23.82780 12.812288 NA 6.291580 0.3397483 0.3787301 NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 NA 27.186570 47.45846 47.69749 19.245042 NA 7.445251 0.1791732 0.1901194 NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 NA 1140.509935 NA 3189.45272 832.210865 NA 361.931940 NA NA NA 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Exclude interpolation and extrapolation

No issues with commit cca452d

knitr::kable(head(oldData[,c(1, grep("^AUC\\d+_\\d+$", names(oldData)), grep("^CONCTIME\\d+$", names(oldData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 NA 62.309949 NA NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 NA 15.775430 NA NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 NA 9.248423 NA NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 NA 16.115864 NA NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 NA 27.186570 NA NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 NA 1140.509935 NA NA NA NA 361.9319 NA NA NA 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include interpolation, exclude extrapolation

Issues with commit cca452d. 4 profiles have values not reported reported for AUC0_64 when they should report a value as 0 and 64 are not extrapolated values.

knitr::kable(head(oldData[,c(1, grep("^AUC\\d+_\\d+$", names(oldData)), grep("^CONCTIME\\d+$", names(oldData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 NA NA NA NA NA NA 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 NA NA NA NA NA NA 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 NA NA NA NA NA NA NA 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 NA NA NA NA NA NA NA 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 NA NA NA NA NA NA NA 11.044250 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 NA NA NA 361.9319 NA 37.06344 546.902894 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120
jhhughes256 commented 4 years ago

With the latest commit 472a0a2 the original issues with INCLUDEINTERPOLATION were fixed. However new regressions were introduced.

Include interpolation and extrapolation

New issues with 472a0a2.

knitr::kable(head(newData[,c(1, grep("^AUC\\d+_\\d+$", names(newData)), grep("^CONCTIME\\d+$", names(newData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 98.11387 63.098301 NA 36.732628 NA NA 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 24.74776 15.219666 NA 8.411666 NA NA 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 15.17517 15.17522 6.130309 NA 2.296925 NA NA 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 23.59851 23.82780 12.812288 NA 6.291580 NA NA 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 47.51955 47.69749 19.245042 NA 7.445251 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 3189.45272 832.210865 NA 361.931940 NA NA NA 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include extrapolation, exclude interpolation

Issues with commit cca452d fixed.

knitr::kable(head(newData[,c(1, grep("^AUC\\d+_\\d+$", names(newData)), grep("^CONCTIME\\d+$", names(newData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 NA 62.309949 NA 98.11387 63.098301 NA 36.732628 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 NA 15.775430 NA 24.74776 15.219666 NA 8.411666 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 NA 9.248423 NA 15.17522 6.130309 NA 2.296925 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 NA 16.115864 NA 23.82780 12.812288 NA 6.291580 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 NA 27.186570 NA 47.69749 19.245042 NA 7.445251 NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 NA 1140.509935 NA 3189.45272 832.210865 NA 361.931940 NA NA NA 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include interpolation, exclude extrapolation

Issues with commit cca452d fixed.

New issues with 472a0a2.

knitr::kable(head(newData[,c(1, grep("^AUC\\d+_\\d+$", names(newData)), grep("^CONCTIME\\d+$", names(newData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 NA NA NA NA NA NA 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 NA NA NA NA NA NA 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 15.17517 NA NA NA NA NA NA 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 23.59851 NA NA NA NA NA NA 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 47.51955 NA NA NA NA NA NA NA 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 NA NA NA 361.9319 NA NA NA 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120
jhhughes256 commented 4 years ago

With the latest commit 19fc464 seems to have resolved all issues with INCLUDEINTERPOLATION with tc1590. I will double check these results against the HTML reports and confirm the behaviour extends to more complex tc1591. Provided these are correct this issue will close without further comment.

Include interpolation and extrapolation

Issues introduced in 472a0a2 resolved.

knitr::kable(head(newData[,c(1, grep("^AUC\\d+_\\d+$", names(newData)), grep("^CONCTIME\\d+$", names(newData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 98.11387 63.098301 65.724934 36.732628 7.3711403 6.4956227 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 24.74776 15.219666 16.092465 8.411666 2.3810272 2.0219357 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 15.17517 15.17522 6.130309 6.720872 2.296925 0.0009867 0.0040891 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 23.59851 23.82780 12.812288 13.719644 6.291580 0.3297009 0.3686827 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 47.51955 47.69749 19.245042 21.009201 7.445251 0.2364780 0.2474242 11.044250 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 3189.45272 832.210865 907.337515 361.931940 44.3411132 37.0634435 546.902894 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include interpolation, exclude extrapolation

Issues introduced in 472a0a2 resolved.

knitr::kable(head(newData[,c(1, grep("^AUC\\d+_\\d+$", names(newData)), grep("^CONCTIME\\d+$", names(newData)))]))
SDEID AUC0_7 AUC8_48 AUC0_64 AUC0_168 AUC12_130 AUC11_130 AUC24_96 AUC60_124 AUC60_100 AUC6_10 CONCTIME1 CONCTIME2 CONCTIME3 CONCTIME4 CONCTIME5 CONCTIME6 CONCTIME7 CONCTIME8 CONCTIME9 CONCTIME10 CONCTIME11 CONCTIME12 CONCTIME13
2925168 19.037484 62.309949 91.60590 NA NA NA NA NA NA 13.778151 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
40876220 3.891138 15.775430 22.48847 NA NA NA NA NA NA 4.556427 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
63536292 4.864913 9.248423 15.17517 NA NA NA NA NA NA 3.893736 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
111299859 5.104697 16.115864 23.59851 NA NA NA NA NA NA 5.177265 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
112146587 16.627023 27.186570 47.51955 NA NA NA NA NA NA 11.044250 0 0.5 1 1.5 2 2.5 4 8 12 16 24 48 72
123811839 1815.233049 1140.509935 3149.77397 NA NA NA 361.9319 NA 37.06344 546.902894 0 0.5 1 2.0 4 8.0 12 16 24 48 72 96 120

Include extrapolation, exclude interpolation

No new regressions.

Exclude extrapolation, exclude interpolation

No new regressions.