FisherExactTest: Method "FisherExactTest"

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/FETFramework.R

Description

The main function of the Fisher Exact Test framework. Creates n times 2 matrices with record counts, where n rows represent dependent variable levels and two columns represent genotype levels. Performs Fisher Exact Tests on calculated count matrices.

Three matrices can be created and three tests can be potentially perform depending on the dataset:

- all records together regardless the sex values - combined dataset,

- records where sex value is "Male" (if such exists) - males only dataset,

- records where sex value is "Female" (if such exists) - females only dataset.

Together with count matrices creates percentage matrices, calculates effect sizes and statistics for count matrices. Performs Fisher Exact Tests.

The results (matrices, statistics and Fisher Exact Test outputs) are stored in PhenTestResult object.

The funciton is called from "testDataset" function when "method" argument is set to "FE" meaning "Fisher Exact Test".

Usage

1
2
3
    FisherExactTest(phenList, 
					depVariable, 
					outputMessages=TRUE)

Arguments

phenList

instance of the PhenList class; mandatory argument

depVariable

a character string defining the dependent variable of interest; mandatory argument

outputMessages

flag: "FALSE" value to suppress output messages; "TRUE" value to show output messages; default value TRUE

Value

Returns results stored in instance of the PhenTestResult class

Author(s)

Natalja Kurbatova, Natasha Karp, Jeremy Mason

References

Karp N, Melvin D, Sanger Mouse Genetics Project, Mott R (2012): Robust and Sensitive Analysis of Mouse Knockout Phenotypes. PLoS ONE 7(12): e52410. doi:10.1371/journal.pone.0052410

West B, Welch K, Galecki A (2007): Linear Mixed Models: A practical guide using statistical software New York: Chapman & Hall/CRC 353 p.

See Also

PhenTestResult

Examples

1
2
3
4
5
6
7
    file <- system.file("extdata", "test_categorical.csv", package="PhenStat")
    test <- PhenStat:::PhenList(dataset=read.csv(file,na.strings = '-'),
            testGenotype="Aff3/Aff3")
    # "FisherExactTest" function is called from "testDataset" function.
    result <- PhenStat:::testDataset(test,depVariable="Thoracic.Processes",method="FE")  
    # Fisher Exact Test results can be printed out using function "summaryOutput"
    summary(result)

PhenStat documentation built on Nov. 8, 2020, 8:13 p.m.