fisher_exact {structToolbox} | R Documentation |
Fisher's exact test (FET). Applies FET for all features in a DatasetExperiment.
fisher_exact(alpha = 0.05, mtc = "fdr", factor_name, factor_pred, ...)
alpha |
the p-value threshold to declare a result 'significant' |
mtc |
multiple test correction method |
factor_name |
the sample_meta column to use |
factor_pred |
A data.frame, with a factor of predicted group labels to compare with factor_name. Can be a data frame with a factor of predictions for each feature.' |
... |
additional slots and values passed to struct_class |
A struct model with functions for applying fisher exact test.
# load some data D=MTBLS79_DatasetExperiment() # prepare predictions based on NA pred=as.data.frame(is.na(D$data)) pred=lapply(pred,factor,levels=c(TRUE,FALSE)) pred=as.data.frame(pred) # apply method M = fisher_exact(alpha=0.05,mtc='fdr',factor_name='class',factor_pred=pred) M=model_apply(M,D)