Learn R Programming

cases (version 0.2.0)

draw_data_roc: Generate binary data (ROC model)

Description

Generate binary data (ROC model)

Usage

draw_data_roc(
  n = 100,
  prev = c(0.5, 0.5),
  random = FALSE,
  m = 10,
  auc = seq(0.85, 0.95, length.out = 5),
  rho = c(0.25, 0.25),
  dist = c("normal", "exponential"),
  e = 10,
  k = 100,
  delta = 0,
  modnames = paste0("model", 1:m),
  corrplot = FALSE,
  ...
)

Value

(list)
list of matrices including generated binary datasets (1: correct prediction, 0: incorrect prediction) for each subgroup (specificity, sensitivity)

Arguments

n

(numeric)
total sample size

prev

(numeric)
disease and healthy prevalence (adds up to 1)

random

(logical)
random sampling (TRUE) or fixed prevalence (FALSE)

m

(numeric)
integer, number of models

auc

(numeric)
vector of AUCs of biomarkers

rho

(numeric)
vector (length 2) of correlations between biomarkers

dist

(character)
either "normal" or "exponential" specifying the subgroup biomarker distributions

e

(numeric)
emulates better (worse) model selection quality with higher (lower) values of e

k

(numeric)
technical parameter which adjusts grid size

delta

(numeric)
specify importance of sensitivity and specificity (default 0)

modnames

(character)
model names (length m)

corrplot

(logical)
if TRUE do not return data but instead plot correlation matrices for final binary data (default: FALSE)

...

(any)
further arguments (currently unused)

Examples

Run this code
data <- draw_data_roc()
head(data)

Run the code above in your browser using DataLab