
Calculate p-values for feature sets or features relative to an empirical null or each other using resampled t-tests
Source:R/stat_test.R
stat_test.RdCalculate p-values for feature sets or features relative to an empirical null or each other using resampled t-tests
Usage
stat_test(
data,
iter_data,
row_id,
by_set = FALSE,
hypothesis,
metric,
train_test_sizes,
n_resamples
)Arguments
- data
data.frameof raw classification accuracy results- iter_data
data.framecontaining the values to iterate over for seed and either feature name or set name- row_id
integerdenoting the row ID foriter_datato filter to- by_set
Booleanspecifying whether you want to compare feature sets (ifTRUE) or individual features (ifFALSE).- hypothesis
characterdenoting whether p-values should be calculated for each feature set or feature (depending onby_setargument) individually relative to the null ifuse_null = TRUEintsfeature_classifierthrough"null", or whether pairwise comparisons between each set or feature should be conducted on main model fits only through"pairwise".- metric
characterdenoting the classification performance metric to use in statistical testing. Can be one of"accuracy","precision","recall","f1". Defaults to"accuracy"- train_test_sizes
integervector containing the train and test set sample sizes- n_resamples
integerdenoting the number of resamples that were calculated