auc {epicalc}R Documentation

Area under time-concentration curve

Description

Compute area under time-concentration curve for individuals

Usage

auc(conc, time, id=NULL)

Arguments

conc concentration
time time point where the concentration was measured
id subject identification

Details

This function compute auc using simple trapezoid summation.

id=NULL is used when concentration (conc) and time are from only one subject.

Author(s)

Virasakdi Chongsuvivatwong <cvirasak@medicine.psu.ac.th>

See Also

'auc' in 'PK' package

Examples

# Using 'by' and 'sapply' to compute individual auc of Indometh data
tmp <- by(data=Indometh, INDICES = Indometh$Subject, FUN = function(x) auc(conc=x$conc, time=x$time, id=NULL))
sapply(tmp, as.numeric)

# A better way to compute
use(Indometh)
auc(conc=conc, time=time, id=Subject)

[Package epicalc version 2.10.1.1 Index]