pairwise.fisher.test | R Documentation |
By conducting repeatedly Fisher's exact tests instead of chi-square tests, this function can test the null-hypothesis of no difference in any pair of proportions for more than 2 groups, with adjustment of type I error for multiple comparison.
pairwise.fisher.test(x, n, p.adjust.method, ...)
x |
A integer vector of event occurences |
n |
A integer vector of trials |
p.adjust.method |
A name in p.adjust.methods to specify the method to adjust type I error for multiple comparisons. Default is "holm". |
... |
Miscellaneous arguments to be given for fisher.test(). |
An object of adjusted p-values for all possible comparisons of pairs with class pairwise.htest.
Minato Nakazawa minatonakazawa@gmail.com https://minato.sip21c.org/. The code of this function was provided by Dr. Shigenobu AOKI (Gunma Univ.).
pairwise.prop.test, p.adjust.methods
pairwise.fisher.test(c(2, 4, 5), c(10, 14, 17), p.adjust.method="bonferroni")
smoker <- c(2, 1, 7)
total <- c(11, 14, 10)
names(total) <- c("A", "B", "C")
pairwise.fisher.test(smoker, total)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.