nauc {drda}R Documentation

Area under the curve


Evaluate the normalized area under the curve (NAUC).


nauc(object, xlim = c(-10, 10), ylim = c(0, 1))



fit object as returned by drda.


numeric vector of length 2 with the lower and upped bound of the integration interval. Default is c(-10, 10).


numeric vector of length 2 with the lower and upped bound of the allowed function values. Default is c(0, 1).


The area under the curve (AUC) is simply the integral of the chosen model ⁠y(x; theta)⁠ with respect to x.

In real applications the response variable is usually contained within a known interval. For example, if our response represents relative viability against a control compound, the curve is then expected to be between 0 and 1.

To make the AUC value comparable between different compounds and/or studies, this function set a hard constraint on both the x variable and the function y. The intervals can always be changed if needed.

The function ⁠f(x; theta)⁠ that is integrated here is defined as

⁠f(x; theta) = ylim[1], if y(x; theta) < ylim[1]⁠

⁠f(x; theta) = y(x; theta), if ylim[1] <= y(x; theta) <= ylim[2]⁠

⁠f(x; theta) = ylim[2], if y(x; theta) > ylim[2]⁠

Finally, the AUC is normalized by its maximum possible value, that is the area of the rectangle with width xlim[2] - xlim[1] and height ylim[2] - ylim[1].


Numeric value representing the normalized area under the curve.

[Package drda version 1.0.0 Index]