sample_lfc_acc: Generate artificial performance data (classification...

View source: R/sample_lfc.R

sample_lfc_accR Documentation

Generate artificial performance data (classification accuracy)

Description

Generate binary data, simulating the assessment of classification accuracy. Result may be passed to SEPM::evaluate() as argument comparison.

Usage

sample_lfc_acc(
  n = 100,
  S = 5,
  acc = 0.8,
  delta = 0,
  corr = "type=equi_rho=0",
  data = NULL,
  job = NULL
)

Arguments

n

integer, sample size of evaluation study

S

integer, number of classification models that are assessed

acc

numeric, accuracy (between 0 and 1) of all models (under the global null), default value is 0.8.

delta

shift parameter

corr

character string (default: "type=equi_rho=0"), specifies correlation structure, see details

data

ignored (required for batchtools compatability)

job

ignored (required for batchtools compatability)

Details

Specification of correlation structure: always starts with "type=..." specifying the correlation matrix type. Currently, only "type=equi" (equicorrelation) and "type=ak" (autocorrelation) are supported. Equicorrelation may be specified as "type=equi_rho=x" (e.g. "type=equi_rho=0.5") for correlation matrix with entries R[i,j]=x^(|i-j|>0) Autocorrelation may be specified as "type=ak_rho=x" (e.g. "type=ak_rho=0.5") for correlation matrix with entries R[i,j]=x^|i-j|.

Value

a list with two entries: args (list of function arguments) and comp (matrix of simulated correct (1) and false (0) predictions)

Examples

dat <- sample_lfc_acc()
str(dat, 2)
dat$comp


maxwestphal/SEPM.SIM documentation built on April 11, 2024, 4:06 p.m.