Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude when too few points text missing for aucinf.obs #112

Closed
kirstenbergmann opened this issue Sep 19, 2019 · 2 comments
Closed

exclude when too few points text missing for aucinf.obs #112

kirstenbergmann opened this issue Sep 19, 2019 · 2 comments

Comments

@kirstenbergmann
Copy link

Hi Bill

Some time ago you included a text in exclude when there are two few datapoints to derive the half-life. However, I'm missing this text for aucinf.obs. The value itself (PPORRES) is set to NA but exclude is also NA. See below.

Best regards
Kirsten

library('PKNCA')
PKNCA.options(default=T)

# Last observation at 8 hours
my_conc <- data.frame(conc=c(0, 2.5, 3, 2.7, 2.3),
                      time=c(0:4),
                      subject=1)

conc_obj <- PKNCAconc(my_conc, conc~time|subject)
data_obj <- PKNCAdata(data.conc=conc_obj,
                      intervals=data.frame(start=0,
                                           end=Inf,
                                           aucinf.obs=TRUE))
results_obj <- pk.nca(data_obj)
#> No dose information provided, calculations requiring dose will return NA.
#> Warning in pk.calc.half.life(conc = c(0, 2.5, 3, 2.7, 2.3), time = c(0, :
#> Too few points for half-life calculation (min.hl.points=3 with only 2
#> points)
as.data.frame(results_obj)
#>    start end subject            PPTESTCD PPORRES
#> 1      0 Inf       1                tmax     2.0
#> 2      0 Inf       1               tlast     4.0
#> 3      0 Inf       1           clast.obs     2.3
#> 4      0 Inf       1            lambda.z      NA
#> 5      0 Inf       1           r.squared      NA
#> 6      0 Inf       1       adj.r.squared      NA
#> 7      0 Inf       1 lambda.z.time.first      NA
#> 8      0 Inf       1   lambda.z.n.points      NA
#> 9      0 Inf       1          clast.pred      NA
#> 10     0 Inf       1           half.life      NA
#> 11     0 Inf       1          span.ratio      NA
#> 12     0 Inf       1          aucinf.obs      NA
#>                                                                          exclude
#> 1                                                                           <NA>
#> 2                                                                           <NA>
#> 3                                                                           <NA>
#> 4  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 5  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 6  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 7  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 8  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 9  Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 10 Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 11 Too few points for half-life calculation (min.hl.points=3 with only 2 points)
#> 12                                                                          <NA>
@billdenney
Copy link
Owner

I'm about to implement this, but a more complex scenario presented itself. I think that all zeros for concentration yields AUC = 0, including AUCinf even though half-life is not estimable (and therefore PKNCA does, too).

So with the update I'm about to provide, in most cases, the exclusion will flow from the half-life calculation. But, in the case of all zeros, the AUC will not be excluded.

@kirstenbergmann
Copy link
Author

Hi Bill

Good point. I didnt think about that scenario. Indeed I agree that all AUC values including AUCinf should be zero in that case.

best regards
Kirsten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants