fisher_exact {structToolbox} | R Documentation

## Fisher Exact Test

### Description

A fisher exact test is used to analyse contingency tables by comparing the number of correctly/incorrectly predicted group labels. A multiple test corrected p-value indicates whether the number of measured values is significantly different between groups.

### Usage

    fisher_exact(alpha = 0.05, mtc = "fdr", factor_name, factor_pred, ...)

### Arguments

`alpha` | (numeric) The p-value cutoff for determining significance. The default is `0.05`.
`mtc` | (character) Multiple test correction method. Allowed values are limited to the following: `"bonferroni"`: Bonferroni correction in which the p-values are multiplied by the number of comparisons. `"fdr"`: Benjamini and Hochberg False Discovery Rate correction. `"none"`: No correction. The default is `"fdr"`.
`factor_name` | (character) The name of a sample-meta column to use.
`factor_pred` | (data.frame) A data.frame, where each column is a factor of predicted group labels to compare with the true groups labels.
`...` | Additional slots and values passed to `struct_class`.

### Value

A `fisher_exact` object.

### Examples

    # 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)

[Package structToolbox version 1.2.0 Index]