Learn R Programming

RVAideMemoire (version 0.9-35)

fisher.multcomp: Pairwise comparisons after a test for independence of 2 categorical variables

Description

Perform pairwise comparisons after a test for independence of 2 categorical variables, by using a Fisher's exact test on each possible 2x2 table.

Usage

fisher.multcomp(tab.cont, p.method = "fdr")

Arguments

tab.cont
contingency table.
p.method
method for p-values correction. See help of p.adjust.

Value

  • methodname of the test.
  • data.namea character string giving the name(s) of the data.
  • p.adjust.methodmethod for p-values correction.
  • p.valuetable of results of pairwise comparisons.

See Also

chisq.test, fisher.test

Examples

Run this code
tab.cont <- 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"))))
chisq.test(tab.cont)
fisher.multcomp(tab.cont)

Run the code above in your browser using DataLab