computeAUC: Calculate AUC from a fitted object

Description Usage Arguments Value Examples

View source: R/drexplorer.R

Description

AUC is calculated through the integrate() function based on dose-response curve.

Usage

1
computeAUC(fit, dmin, dmax, islogd = TRUE)

Arguments

fit

usually a drFit object. However, any object with a predict method would work.

dmin

minimum dose. The integral range is [dmin, dmax].

dmax

maximum dose. The integral range is [dmin, dmax].

islogd

whether the supplied dose dmin/dmax is in log10 scale. The user should be responsible for the consistency between the actual value of dmin, dmax and islogd. If log10 transformed dmin/dmax is supplied with islogd = TRUE, the AUC is calculated based on dose-response curve with x-axis being log10(dose); On the other hand, if dmin, dmax is original scale and islogd = FALSE, the AUC is calculated based on a dose-response curve with x-axis being dose.

Value

a vector of AUC, AUC0 and AUCs. AUC is the area under dose response curve; AUC0 is the area under the line response = 1; AUCS is AUC/AUC0

Examples

1
2
3
data(ryegrass, package = 'drc') # use the ryegrass data from drc package
fit.sigEmax <- drFit(drMat=ryegrass[, c(2, 1)], modelName = "sigEmax", alpha = 0.01, fitCtr = FALSE)
computeAUC(fit.sigEmax, dmin = -0.027, dmax = 1.477, islogd = TRUE)

lshen1/drexplorer2 documentation built on June 2, 2020, 9:27 p.m.