roc2: Calculate ROC (Receiver Operating Characteristic) statistics...

roc2R Documentation

Calculate ROC (Receiver Operating Characteristic) statistics for two numeric vectors.

Description

This function calculates ROC statistics, including True Positive Rate (TPR), False Positive Rate (FPR), True Positives (TP), True Negatives (TN), False Positives (FP), False Negatives (FN), and True Skill Score (TSS) for two numeric vectors.

Usage

roc2(state, indicator, ...)

Arguments

state

A numeric vector representing the state values.

indicator

A numeric vector representing the indicator values.

Value

A data frame containing the following columns:

state

The state values.

label

A logical vector indicating whether each state is greater than 1 (TRUE) or not (FALSE).

indicator

The indicator values.

TPR

The True Positive Rate (TPR) calculated as TP / (TP + FN).

FPR

The False Positive Rate (FPR) calculated as FP / (FP + TN).

TP

The True Positives (TP).

TN

The True Negatives (TN).

FP

The False Positives (FP).

FN

The False Negatives (FN).

TSS

The True Skill Score (TSS) calculated as (TP / (TP + FN)) - (FP / (FP + TN)).

order

The order of the indicator values after sorting in descending order.


laurieKell/FLCandy documentation built on April 17, 2025, 5:23 p.m.