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

Fix IV bolus calculations not to require time = 0 #352

Open
billdenney opened this issue Jan 3, 2025 · 0 comments
Open

Fix IV bolus calculations not to require time = 0 #352

billdenney opened this issue Jan 3, 2025 · 0 comments

Comments

@billdenney
Copy link
Owner

C0 should be imputed here automatically

library(PKNCA)
#> 
#> Attaching package: 'PKNCA'
#> The following object is masked from 'package:stats':
#> 
#>     filter

d_iv <- data.frame(conc = c(4, 2, 1, 0.45), time = c(5, 15, 30, 60))
d_intervals <- data.frame(start = 0, end = Inf, aucivinf.obs = TRUE)
o_conc <- PKNCAconc(data = d_iv, conc~time)
o_data <- PKNCAdata(o_conc, intervals = d_intervals)
o_nca <- pk.nca(o_data)
#> No dose information provided, calculations requiring dose will return NA.
#> Warning in pk.calc.c0(conc = c(4, 2, 1, 0.45), time = c(5, 15, 30, 60), :
#> time.dose is NA
#> Warning: Requesting an AUC range starting (0) before the first measurement (5)
#> is not allowed
as.data.frame(o_nca)
#> # A tibble: 14 × 5
#>    start   end PPTESTCD            PPORRES exclude                              
#>    <dbl> <dbl> <chr>                 <dbl> <chr>                                
#>  1     0   Inf c0                  NA      <NA>                                 
#>  2     0   Inf tmax                 5      <NA>                                 
#>  3     0   Inf tlast               60      <NA>                                 
#>  4     0   Inf clast.obs            0.45   <NA>                                 
#>  5     0   Inf lambda.z             0.0322 <NA>                                 
#>  6     0   Inf r.squared            0.978  <NA>                                 
#>  7     0   Inf adj.r.squared        0.956  <NA>                                 
#>  8     0   Inf lambda.z.time.first 15      <NA>                                 
#>  9     0   Inf lambda.z.n.points    3      <NA>                                 
#> 10     0   Inf clast.pred           0.431  <NA>                                 
#> 11     0   Inf half.life           21.5    <NA>                                 
#> 12     0   Inf span.ratio           2.09   <NA>                                 
#> 13     0   Inf aucinf.obs          NA      Requesting an AUC range starting (0)…
#> 14     0   Inf aucivinf.obs        NA      Requesting an AUC range starting (0)…

Created on 2025-01-03 with reprex v2.1.1

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

1 participant