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

Feature Request: Enable Calculation of Secondary Parameters #76

Open
billdenney opened this issue Jul 31, 2018 · 0 comments
Open

Feature Request: Enable Calculation of Secondary Parameters #76

billdenney opened this issue Jul 31, 2018 · 0 comments

Comments

@billdenney
Copy link
Owner

Secondary parameters need linkage between the reference and test periods. This could be accomplished by having a double-entry in the row for the calculations. One way is with a defined separator, and another option would be to use list-columns (but that may be too complex for most users). Automatic calculation of which parameters are required in the test and reference intervals would be complex because, for instance, it's not necessarily clear which interval should have Ae and which should have the AUC calculated.

As an example, to calculate renal clearance, the matrix results for plasma AUC and urine Ae need to be combined. This could be done with something like:

library(PKNCA)                                                                              
                                                                                            
PKNCA.options(test_reference_separator="_") # Note that this doesn't exist right now.       
#> Error in PKNCA.options(test_reference_separator = "_"): Invalid setting for PKNCA: test_reference_separator
my_intervals <-                                                                             
data.frame(start=0, end=1,                                                                  
Matrix=c("PLASMA", "URINE", "PLASMA_URINE"),                                                
aucinf.pred=c(TRUE, FALSE, FALSE), clr.pred=c(FALSE, FALSE, TRUE), ae=c(FALSE, TRUE, FALSE),
stringsAsFactors=FALSE)                                                                     
print(my_intervals)                                                                         
#>   start end       Matrix aucinf.pred clr.pred    ae
#> 1     0   1       PLASMA        TRUE    FALSE FALSE
#> 2     0   1        URINE       FALSE    FALSE  TRUE
#> 3     0   1 PLASMA_URINE       FALSE     TRUE FALSE
                                                                                            
print(check.interval.specification(my_intervals))                                           
#>   start end auclast aucall aumclast aumcall aucint.last aucint.last.dose
#> 1     0   1   FALSE  FALSE    FALSE   FALSE       FALSE            FALSE
#> 2     0   1   FALSE  FALSE    FALSE   FALSE       FALSE            FALSE
#> 3     0   1   FALSE  FALSE    FALSE   FALSE       FALSE            FALSE
#>   aucint.all aucint.all.dose auclast.dn aucall.dn aumclast.dn aumcall.dn
#> 1      FALSE           FALSE      FALSE     FALSE       FALSE      FALSE
#> 2      FALSE           FALSE      FALSE     FALSE       FALSE      FALSE
#> 3      FALSE           FALSE      FALSE     FALSE       FALSE      FALSE
#>    cmax  cmin  tmax tlast tfirst clast.obs cl.last cl.all     f mrt.last
#> 1 FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE  FALSE FALSE    FALSE
#> 2 FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE  FALSE FALSE    FALSE
#> 3 FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE  FALSE FALSE    FALSE
#>   mrt.iv.last vss.last vss.iv.last   cav ctrough   ptr  tlag deg.fluc
#> 1       FALSE    FALSE       FALSE FALSE   FALSE FALSE FALSE    FALSE
#> 2       FALSE    FALSE       FALSE FALSE   FALSE FALSE FALSE    FALSE
#> 3       FALSE    FALSE       FALSE FALSE   FALSE FALSE FALSE    FALSE
#>   swing  ceoi    ae clr.last clr.obs clr.pred    fe half.life r.squared
#> 1 FALSE FALSE FALSE    FALSE   FALSE    FALSE FALSE     FALSE     FALSE
#> 2 FALSE FALSE  TRUE    FALSE   FALSE    FALSE FALSE     FALSE     FALSE
#> 3 FALSE FALSE FALSE    FALSE   FALSE     TRUE FALSE     FALSE     FALSE
#>   adj.r.squared lambda.z lambda.z.time.first lambda.z.n.points clast.pred
#> 1         FALSE    FALSE               FALSE             FALSE      FALSE
#> 2         FALSE    FALSE               FALSE             FALSE      FALSE
#> 3         FALSE    FALSE               FALSE             FALSE      FALSE
#>   span.ratio cmax.dn cmin.dn clast.obs.dn clast.pred.dn cav.dn ctrough.dn
#> 1      FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
#> 2      FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
#> 3      FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
#>   thalf.eff.last thalf.eff.iv.last kel.last kel.iv.last aucinf.obs
#> 1          FALSE             FALSE    FALSE       FALSE      FALSE
#> 2          FALSE             FALSE    FALSE       FALSE      FALSE
#> 3          FALSE             FALSE    FALSE       FALSE      FALSE
#>   aucinf.pred aumcinf.obs aumcinf.pred aucint.inf.obs aucint.inf.obs.dose
#> 1        TRUE       FALSE        FALSE          FALSE               FALSE
#> 2       FALSE       FALSE        FALSE          FALSE               FALSE
#> 3       FALSE       FALSE        FALSE          FALSE               FALSE
#>   aucint.inf.pred aucint.inf.pred.dose aucinf.obs.dn aucinf.pred.dn
#> 1           FALSE                FALSE         FALSE          FALSE
#> 2           FALSE                FALSE         FALSE          FALSE
#> 3           FALSE                FALSE         FALSE          FALSE
#>   aumcinf.obs.dn aumcinf.pred.dn aucpext.obs aucpext.pred cl.obs cl.pred
#> 1          FALSE           FALSE       FALSE        FALSE  FALSE   FALSE
#> 2          FALSE           FALSE       FALSE        FALSE  FALSE   FALSE
#> 3          FALSE           FALSE       FALSE        FALSE  FALSE   FALSE
#>   mrt.obs mrt.pred mrt.iv.obs mrt.iv.pred mrt.md.obs mrt.md.pred vz.obs
#> 1   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE  FALSE
#> 2   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE  FALSE
#> 3   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE  FALSE
#>   vz.pred vss.obs vss.pred vss.iv.obs vss.iv.pred vss.md.obs vss.md.pred
#> 1   FALSE   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE
#> 2   FALSE   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE
#> 3   FALSE   FALSE    FALSE      FALSE       FALSE      FALSE       FALSE
#>   vd.obs vd.pred thalf.eff.obs thalf.eff.pred thalf.eff.iv.obs
#> 1  FALSE   FALSE         FALSE          FALSE            FALSE
#> 2  FALSE   FALSE         FALSE          FALSE            FALSE
#> 3  FALSE   FALSE         FALSE          FALSE            FALSE
#>   thalf.eff.iv.pred kel.obs kel.pred kel.iv.obs kel.iv.pred       Matrix
#> 1             FALSE   FALSE    FALSE      FALSE       FALSE       PLASMA
#> 2             FALSE   FALSE    FALSE      FALSE       FALSE        URINE
#> 3             FALSE   FALSE    FALSE      FALSE       FALSE PLASMA_URINE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant