fisher.multcomp {RVAideMemoire} | R Documentation |
Pairwise comparisons using Fisher's exact test
Description
Performs pairwise comparisons after a comparison of proportions or after a test for independence of 2 categorical variables, by using a Fisher's exact test.
Usage
fisher.multcomp(tab.cont, p.method = "fdr")
Arguments
tab.cont |
contingency table. |
p.method |
method for p-values correction. See help of |
Details
Since chi-squared and G tests are approximate tests, exact tests are preferable when the number of individuals is small (200 is a reasonable minimum).
Value
method |
name of the test. |
data.name |
a character string giving the name(s) of the data. |
p.adjust.method |
method for p-values correction. |
p.value |
table of results of pairwise comparisons. |
Author(s)
Maxime HERVE <maxime.herve@univ-rennes1.fr>
See Also
chisq.test
, prop.test
, fisher.test
Examples
# 2-column contingency table: comparison of proportions
tab.cont1 <- matrix(c(17,23,12,24,20,10),ncol=2,dimnames=list(c("Control",
"Treatment1","Treatment2"),c("Alive","Dead")),byrow=TRUE)
fisher.test(tab.cont1)
fisher.multcomp(tab.cont1)
# 3-column contingency table: independence test
tab.cont2 <- as.table(matrix(c(25,10,12,6,15,14,9,16,9),ncol=3,dimnames=list(c("fair",
"dark","russet"),c("blue","brown","green"))))
fisher.test(tab.cont2)
fisher.multcomp(tab.cont2)
[Package RVAideMemoire version 0.9-83-7 Index]