# fisher.multcomp: Pairwise comparisons using Fisher's exact test In RVAideMemoire: Testing and Plotting Procedures for Biostatistics

## 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

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

## Arguments

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

## 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 Herv<e9> <[email protected]>

`chisq.test`, `prop.test`, `fisher.test`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```# 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) ```

### Example output

```*** Package RVAideMemoire v 0.9-68 ***

Fisher's Exact Test for Count Data

data:  tab.cont1
p-value = 0.02316
alternative hypothesis: two.sided

Pairwise comparisons using Fisher's exact test for count data

data:  tab.cont1

Control Treatment1
Treatment1 0.48195          -
Treatment2 0.08352    0.03839

P value adjustment method: fdr

Fisher's Exact Test for Count Data

data:  tab.cont2
p-value = 0.005733
alternative hypothesis: two.sided

Pairwise comparisons using Fisher's exact test for count data

data:  tab.cont2

blue:brown blue:green brown:green
fair:dark      0.02211    0.03435      0.7793
fair:russet    0.03435    0.44655      0.4801
dark:russet    0.77935    0.44655      0.5362

P value adjustment method: fdr
```

RVAideMemoire documentation built on Nov. 6, 2018, 5:05 p.m.