auc_diff {brainGraph} | R Documentation |
Difference in the area-under-the-curve of two vectors
Description
This function takes two vectors, calculates the area-under-the-curve (AUC), and calculates the difference between the two (if applicable).
Usage
auc_diff(x, y)
Arguments
x |
Numeric vector of the x-values |
y |
A numeric vector or matrix |
Details
There are 4 different behaviors for this function:
If
x
is a single numeric value, theny
should be a vector of 2 values and the difference is returned. This generally should not occur and may be removed in the future.If
y
has 1 column (or is a vector), then the AUC ofy
is returned.If
y
has exactly 2 columns, then each column should contain the values of interest for each subject group, and the difference in AUC's for each group is returned.If
y
has multiple columns (e.g., equal to the number of vertices of a graph), it will calculate the AUC for each column.
Value
A numeric value of the difference between two groups, or a numeric vector of the AUC across vertices