gAUC.RdGeneral AUC function for Emax, TEmax and AUCs
gAUC(x, y, Ymax = "Emax", XofYmax = "TEmax", AUCname = "AUEClast", iAUC = "",
Outer = "NEAREST")This is a general purpose AUC function. It calculates only Cmax(Emax), Tmax(TEmax) and AUCs(AUECs). This can be used for effect(pharmacodynamic) data which has negative values. For concentration data, use IntAUC.
Column names can vary according to the options.
maximum y value
x value at the maximum y value
Area under the y versus x curve
Columns from iAUC input
# For one subject
x = Theoph[Theoph$Subject=="1", "Time"]
y = Theoph[Theoph$Subject=="1", "conc"]
gAUC(x, y)
#> $Emax
#> [1] 10.5
#>
#> $TEmax
#> [1] 1.12
#>
#> $Tfrst
#> [1] 0
#>
#> $Tlast
#> [1] 24.37
#>
#> $AUEClast
#> [1] 148.923
#>
iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24))
gAUC(x, y, iAUC=iAUC)
#> $Emax
#> [1] 10.5
#>
#> $TEmax
#> [1] 1.12
#>
#> $Tfrst
#> [1] 0
#>
#> $Tlast
#> [1] 24.37
#>
#> $AUEClast
#> [1] 148.923
#>
#> $`AUC[0-12h]`
#> [1] 91.73552
#>
#> $`AUC[0-24h]`
#> [1] 147.6946
#>