Learn R Programming

cases (version 0.1.1)

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

Generated binary dataset

Arguments

n

integer, total sample size

prev

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

random

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

m

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

integer, technical parameter which adjusts grid size

delta

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

modnames

character, model names (length m)

corrplot

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

...

further arguments (currently unused)

Examples

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

Run the code above in your browser using DataLab