prepare.roc: Prepare ROC

View source: R/dthelper-computation-functions.R

prepare.rocR Documentation

Prepare ROC

Description

Computes number of true positives, false positive, true negatives, and false negatives for each participant

Usage

prepare.roc(df, positive, negative)

Arguments

df

data.frame object

positive

Variables which has the "correct" answer of 1

negative

Variables which has the "correct" answer of 0

Value

data.frame object

Examples

set.seed(100)
df <- data.frame(
     p1 = sample(0:1, size = 10, replace = T),
     p2 = sample(0:1, size = 10, replace = T),
     n1 = sample(0:1, size = 10, replace = T),
     n2 = sample(0:1, size = 10, replace = T)
     )
prepare.roc(df, positive = c("p1","p2"), negative = c("n1","n2"))


dennisteowh/dthelper documentation built on March 19, 2022, 11:42 a.m.