Learn R Programming

cases (version 0.1.1)

draw_data: Generate binary data

Description

Generate binary data

Usage

draw_data(
  n = 200,
  prev = c(0.5, 0.5),
  random = FALSE,
  m = 10,
  method = c("roc", "lfc", "pr"),
  pars = list(),
  ...
)

Value

generated binary data (possibly stratified for subgroups)

Arguments

n

integer, overall sample size

prev

numeric, vector of class prevalences (adding up to 1)

random

logical, random sampling (TRUE) or fixed group sample sizes

m

integer, number of models

method

character, either "roc", "lfc" (multiple subgroups) or "prob" (no subgroups)

pars

list, containing further named parameters passed to draw_data_roc, draw_data_lfc

...

further named parameters passed

Examples

Run this code
draw_data()

Run the code above in your browser using DataLab