create.biased.idx: Create biased indices for testing

View source: R/create_biased_test_idx.R

create.biased.idxR Documentation

Create biased indices for testing

Description

This function creates biased indices for testing with an additional confounder

Usage

create.biased.idx(sim.location, subsets, repetitions,
lab.svar = NULL, meta.svar = NULL, strat.scheme = 'all', bias = 0.5)

Arguments

sim.location

file name for the .h5 file containing the simulations

subsets

vector of intended subset sizes for resampled data

repetitions

number of unique sets of indices to generate for each subset size deemed valid

lab.svar

for real data, name of the main stratification "label" variable in the original metadata; defaults to NULL and is not applicable for simulated data

meta.svar

for real data, a single string or vector of strings corresponding to the name(s) of binary metadata variable(s) by which biased resampling should be stratified; defaults to NULL and is not applicable for simulated data

strat.scheme

character, name of the index group to be written within the .h5 file containing different indices for downstream testing Can be either 'biomarker','confounder', 'random', or 'all' (the default)

bias

float, strength of the confounder bias in the subsampling

Details

todo

Value

vector of real metadata variables insufficient for resampling, if applicable, otherwise nothing returned & indices are written to 'sim.location'


zellerlab/SIMBA documentation built on June 2, 2025, 6:25 a.m.