rcompanion (version 2.2.2)

pairwisePermutationSymmetry: Pairwise two-sample permutation symmetry tests

Description

Conducts pairwise two-sample permutation tests of symmetry across groups.

Usage

pairwisePermutationSymmetry(formula = NULL, data = NULL, x = NULL,
  g = NULL, b = NULL, method = "fdr", ...)

Arguments

formula

A formula indicating the measurement variable and the grouping variable. e.g. y ~ group | block.

data

The data frame to use.

x

The response variable as a vector.

g

The grouping variable as a vector.

b

The blocking variable as a vector.

method

The p-value adjustment method to use for multiple tests. See stats::p.adjust.

...

Additional arguments passed to coin::symmetry_test.

Value

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

Details

The input should include either formula and data; or x, g, and b.

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 pairwisePermutationSymmetry function can be used as a post-hoc method following an omnibus permutation test analogous to a paired one-way analysis of variance.

References

http://rcompanion.org/handbook/K_03.html

See Also

pairwisePermutationSymmetryMatrix

Examples

Run this code
# NOT RUN {
data(BobBelcher)
BobBelcher$Instructor = factor( BobBelcher$Instructor, 
                  levels = c("Linda Belcher", "Louise Belcher",
                             "Tina Belcher", "Bob Belcher",
                             "Gene Belcher"))
BobBelcher$Likert.f = factor(BobBelcher$Likert, ordered=TRUE)
PT = pairwisePermutationSymmetry(Likert.f ~ Instructor | Rater,
                                 data      = BobBelcher,
                                 method = "fdr")
PT
cldList(comparison = PT$Comparison,
        p.value    = PT$p.adjust,
        threshold  = 0.05)

# }

Run the code above in your browser using DataLab