trapezoidal_linear_up_log_down: Linear-up and log-down trapezoidal rule
Description
Computes the area under the curve (AUC) or the area under the moment curve (AUMC)
using a hybrid trapezoidal rule. The method uses linear interpolation for increasing
or constant concentration segments, and logarithmic interpolation for decreasing segments.
Usage
trapezoidal_linear_up_log_down(x, y, moment = FALSE)
Value
A numeric value representing the estimated AUC or AUMC using the linear-up/log-down trapezoidal method.
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 C(t).
Details
If moment = TRUE, the function calculates the area under the moment curve (AUMC),
i.e., it integrates t * C(t) over time instead of just C(t).