pairwisefisher: Exact version of pairwise.prop.test

pairwise.fisher.testR Documentation

Exact version of pairwise.prop.test

Description

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.

Usage

 pairwise.fisher.test(x, n, p.adjust.method, ...)

Arguments

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().

Value

An object of adjusted p-values for all possible comparisons of pairs with class pairwise.htest.

Author(s)

Minato Nakazawa minatonakazawa@gmail.com https://minato.sip21c.org/. The code of this function was provided by Dr. Shigenobu AOKI (Gunma Univ.).

See Also

pairwise.prop.test, p.adjust.methods

Examples

 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)

fmsb documentation built on May 29, 2024, 2:02 a.m.

Related to pairwisefisher in fmsb...