Calculates the area under curve based on the trapezoidal integration method.
auc(time, resp)
time | A vector with the time numeric variable. |
---|---|
resp | A vector with the response numeric variable. |
Returns the area under the curve based on the trapezoidal method.
# Area for the colored region. auc(time = x, resp = y)#> [1] 8