AUC: Calculate AUC Using the Trapezoidal Method

Description Usage Arguments Details Value Author(s) References

Description

Calculate the area under the curve (AUC) for each subject over the time interval for dv using the trapezoidal rule.

Usage

1
AUC(data, time = 'TIME', id = 'ID', dv = 'DV')

Arguments

data

data.frame containing the data to use for the AUC calculation

time

chronologically ordered time variable present in data

id

variable in data defining subject level data

dv

dependent variable used to calculate AUC present in data

Details

The AUC function performs the calculation based on the variables id, time, and dv present in the R data object. Warnings are issued if any of these contain NA.

Value

One area under the dv-time curve is returned for each subject.

Author(s)

Leonid Gibiansky

References

http://metrumrg.googlecode.com


metrumrg documentation built on May 2, 2019, 5:55 p.m.