Learn R Programming

plotROC (version 1.2)

calculate_multi_roc: Calculate the ROC curve for multiple biomarkers

Description

Calculate ROC curves given labels and predictions. Designed to work with the multi_ggroc function, this takes a dataframe and computes the ROC curve for a given list of markers.

Usage

calculate_multi_roc(data, M_string, D_string)

Arguments

data
Data frame containing at least 1 marker and the common class labels
M_string
vector of marker column names
D_string
class label column name

Value

  • List of data frame containing cutoffs, and estimated true and false positive fractions

Examples

Run this code
D.ex <- rbinom(100, 1, .5)
fakedata <- data.frame(M1 = rnorm(100, mean = D.ex),
   M2 = rnorm(100, mean = D.ex, sd = .4), D = D.ex)
calculate_multi_roc(fakedata, c("M1", "M2"), "D")

Run the code above in your browser using DataLab