auc_partial | R Documentation |
Calculate partial AUC
auc_partial(idv, dv, range = c(0, Inf))
idv |
independent variable (such as time) |
dv |
dependent variable (such as concentration) |
range |
time range for pauc calculation |
default range is 0 to tmax is recommended to be used alongside dplyr for ease of calculation if an individual does not have any value within the specified range a warning will be issued and an NA value will be returned. This is important if some individuals dropped out early and do not have all observations other individuals have.
s_pauc
library(PKPDmisc) library(dplyr, quiet = TRUE) df <- capitalize_names(sd_oral_richpk) head(df) df %>% group_by(ID) %>% summarize(pAUC0_10 = auc_partial(TIME, CONC, c(0,10))) df %>% group_by(ID) %>% summarize(auc0_tlast = auc_partial(TIME, CONC))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.