Class TestCasesFisherExactTest
- java.lang.Object
-
- org.snpeff.snpEffect.testCases.unity.TestCasesFisherExactTest
-
public class TestCasesFisherExactTest extends java.lang.Object
Test for Hypergeometric distribution and Fisher exact test- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static double
MAX_DIFF
-
Constructor Summary
Constructors Constructor Description TestCasesFisherExactTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate_test()
Create commands in R to run and get test resultsvoid
test_0()
void
test_03_fisher()
void
test_04_fisher()
void
test_05_fisher()
void
test_06_fisher_vs_chi2()
Compare Fisher exact test to Chi^2 approximation
-
-
-
Method Detail
-
generate_test
public void generate_test()
Create commands in R to run and get test results
-
test_0
@Test public void test_0()
-
test_03_fisher
@Test public void test_03_fisher()
-
test_04_fisher
@Test public void test_04_fisher()
-
test_05_fisher
@Test public void test_05_fisher()
-
test_06_fisher_vs_chi2
@Test public void test_06_fisher_vs_chi2()
Compare Fisher exact test to Chi^2 approximationFrom R: > data <- matrix(c(25, 5, 15, 15), ncol=2, byrow=T) > data [,1] [,2] [1,] 25 5 [2,] 15 15
> chisq.test(data,correct=FALSE)
Pearson's Chi-squared test
data: data X-squared = 7.5, df = 1, p-value = 0.00617
> fisher.test(data, alternative="greater")
Fisher's Exact Test for Count Data
data: data p-value = 0.006349 alternative hypothesis: true odds ratio is greater than 1 95 percent confidence interval: 1.587561 Inf sample estimates: odds ratio 4.859427
-
-