Generate binary data (LFC model)
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),
...
)
(list)
list of matrices including generated binary datasets
(1: correct prediction, 0: incorrect prediction) for each subgroup (specificity, sensitivity)
(numeric)
integer, total sample size
(numeric)
disease and healthy prevalence (length 2, adds up to 1)
(logical)
random sampling (TRUE) or fixed prevalence (FALSE)
(numeric)
integer, number of models
(numeric)
sensitivity (length 1)
(numeric)
specificity (length 1)
(numeric)
integer, between 1 and m, specifies how many sensitivity values are projected to 1
(numeric)
worst alternative is computed under side condition Acc <= L
(default value L=1 corresponds to true LFC where values are projected to 1)
(matrix)
correlation matrix for empirical sensitivities (m x m)
(maxtrix)
correlation matrix for empirical specificities (m x m)
(modnames)
character, model names (length m)
(any)
further arguments (currently unused)
data <- draw_data_lfc()
head(data)
Run the code above in your browser using DataLab