auc_diff: Difference in the area-under-the-curve of two vectors

Description Usage Arguments Details Value

View source: R/auc.R

Description

This function takes two vectors, calculates the area-under-the-curve (AUC), and calculates the difference between the two (if applicable).

Usage

1
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:

  1. If x is a single numeric value, then y should be a vector of 2 values and the difference is returned. This generally should not occur and may be removed in the future.

  2. If y has 1 column (or is a vector), then the AUC of y is returned.

  3. 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.

  4. 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


brainGraph documentation built on Oct. 23, 2020, 6:37 p.m.