simulate_roc: Simulate data to estimate ROC curves

View source: R/roc.R

simulate_rocR Documentation

Simulate data to estimate ROC curves

Description

Simulate data from the null and alternative distributions to estimate ROC curves for a collection of methods.

Usage

simulate_roc(
  apply_methods,
  gen_null_data,
  gen_alt_data,
  nruns = 100,
  core_count = parallel::detectCores() - 1,
  seed = NULL
)

Arguments

apply_methods

a function that returns a data.frame with columns "method", "tstat" and "twosided"

gen_null_data

a function that generate data under the null model

gen_alt_data

a function that generate data under the alternative model

nruns

number of simulated data from the null/alternative model

core_count

number of cores used in parallel computing

seed

seed for random simulation

Value

a list of result

roc

A data frame used to plot ROC curves with columns: method, whether a two sided test, false positive rate (FPR), and true positive rate (TPR)

raw

A data frame containing raw output from null and alternative models with columns: method, statistics value, whether a two sided test, and the type of hypothesis

elapsed_time

symstem elapsed time for generating ROC data


aaamini/nett documentation built on Nov. 12, 2022, 6:25 p.m.