Description Usage Arguments Details Value Author(s) References See Also Examples
Calculate pairwise comparisons between group levels with corrections for multiple testing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | pairwise.chisq.test(x, ...)
pairwise.fisher.test(x, ...)
## Default S3 method:
pairwise.chisq.test(x, g, p.adj = p.adjust.methods, ...)
## S3 method for class 'table'
pairwise.chisq.test(x, p.adj = p.adjust.methods,
DNAME = NULL, ...)
## Default S3 method:
pairwise.fisher.test(x, g, p.adj = p.adjust.methods, ...)
## S3 method for class 'table'
pairwise.fisher.test(x, p.adj = p.adjust.methods,
DNAME = NULL, ...)
|
x |
a numeric vector or matrix. x and g can also both be factors. |
g |
a vector; ignored if x is a matrix. |
p.adj |
correction method among |
DNAME |
table dimension names. |
... |
further arguments to be passed to or from methods. |
Calculate Chi-square or Fisher test p-values for all combinaisons of the levels of g
.
Object of class "pairwise.htest"
.
Antoine Filipovic Pierucci
Original functions written by Dr Jean-Philippe Jais.
1 2 3 4 5 | x <- sample(1:2, 1e3, TRUE)
g <- sample(1:4, 1e3, TRUE)
pairwise.chisq.test(x, g)
tab <- table(g, x)
pairwise.fisher.test(tab, p.adj = "bonf")
|
Pairwise comparisons using Pearson's Chi-squared tests
data: x and g
1 2 3 4
1 - - - -
2 1 - - -
3 1 1 - -
4 1 1 1 -
P value adjustment method: holm
Pairwise comparisons using Fisher's Exact Tests for Count Data
data: tab
1 2 3 4
1 - - - -
2 1 - - -
3 1 1 - -
4 1 1 1 -
P value adjustment method: bonferroni
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.