A function for visual representation of pairwise testing (both for pairwise.t.test and pairwise.wilcox.test)

Description

Plot sets of groups in which means of medians are not significantly different.

On the veritical axis the means are marked. Then in a greedy fashion means that are not significantly different are linked by a line.

Usage

1
2
 plotPairwiseTests(p.vals, means, alpha=0.05, digits=3, mar=c(2,10,3,1), ...) 
 

Arguments

p.vals

A slot $p.value from the object returned by pairwise.*.test function

means

A vector of means or medians corresponding to p.vals object (the order of groups should be the same in both objects)

alpha

A threshold for p.value

digits

Number of significant digits to be ploted with means.

mar

Figure margins, left margin should be large enought to handle names of groups

...

These arguments are passed to the plot function.

Author(s)

Przemyslaw Biecek

Examples

1
2
3
4
data(iris)
tmp1 <- pairwise.wilcox.test(iris$Sepal.Width, iris$Species)
tmp2 <- tapply(iris$Sepal.Width, iris$Species, median, na.rm=TRUE)
plotPairwiseTests(tmp1$p.value, tmp2, alpha=0.001)