AUC {MIfuns} | R Documentation |
Calculate the area under the curve (AUC) for each subject over the time interval for dv using the trapezoidal rule.
AUC(data, time = "TIME", id = "ID", dv = "DV")
data |
the name of the R dataframe 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 |
The AUC() function performs the calculation based on the variables id, time, and dv present in the R data object
one area under the dv-time curve is returned for each subject
Developed by Metrum Institute (Bill Knebel, Tim Bergsma, and others).
MIfun package available from Metrum Institute website (http://metruminstitute.org/
).