Computes the area under the curve (AUC) or the area under the moment curve (AUMC) using the linear trapezoidal rule.
If moment = TRUE, the function estimates AUMC by integrating time * concentration.
Usage
trapezoidal_linear(x, y, moment = FALSE)
Value
A numeric value representing the estimated AUC or AUMC using the linear trapezoidal rule.
Arguments
x
A numeric vector representing the time points.
y
A numeric vector representing the corresponding concentration values at each time point.
moment
Logical. If TRUE, computes AUMC by integrating t * C(t) instead of just C(t).