Learn R Programming

cases (version 0.1.1)

draw_data_lfc: Generate binary data (LFC model)

Description

Generate binary data (LFC model)

Usage

draw_data_lfc(
  n = 100,
  prev = c(0.5, 0.5),
  random = FALSE,
  m = 10,
  se = 0.8,
  sp = 0.8,
  B = round(m/2),
  L = 1,
  Rse = diag(rep(1, m)),
  Rsp = diag(rep(1, m)),
  modnames = paste0("model", 1:m),
  ...
)

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

se

numeric, sensitivity (length 1)

sp

numeric, specificity (length 1)

B

integer, between 1 and m, specifies how many sensitivity values are projected to 1

L

numeric, worst alternative is computed under side condition Acc <= L (default value L=1 corresponds to true LFC where values are projected to 1)

Rse

matrix, correlation matrix for empirical sensitivities (m x m)

Rsp

matrix, correlation matrix for empirical specificities (m x m)

modnames

character, model names (length m)

...

further arguments (currently unused)

Examples

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

Run the code above in your browser using DataLab