Learn R Programming

rcompanion (version 1.0.1)

pairwisePermutationTest: Pairwise two-sample permutation tests

Description

Conducts pairwise two-sample permutation tests across groups.

Usage

pairwisePermutationTest(x, g, method = "fdr", ...)

Arguments

x
The response variable as a vector.
g
The grouping variable as a vector.
method
The p-value adjustment method to use for multiple tests. See p.adjust.
...
Additional arguments passed to independence_test.

Value

A dataframe of the groups being compared, the p-values, and the adjusted p-values.

Details

Permutation tests are non-parametric tests that do not assume normally-distributed errors. See http://rcompanion.org/rcompanion/d_06a.html for futher discussion of this test.

The pairwisePermutationTest function can be used as a post-hoc method following an omnibus permutation test analogous to a one-way analysis of variance.

References

http://rcompanion.org/rcompanion/d_06a.html

See Also

pairwisePermutationMatrix

Examples

Run this code
data(PoohPiglet)
PoohPiglet = PoohPiglet[order(factor(PoohPiglet$Speaker, 
                        levels=c("Pooh", "Tigger", "Piglet"))),]
pairwisePermutationTest(x      = PoohPiglet$Likert,
                        g      = PoohPiglet$Speaker,
                        method = "fdr")

Run the code above in your browser using DataLab