tidy.pairwise.htest {broom} | R Documentation

## tidy a pairwise hypothesis test

### Description

Tidy a pairwise.htest object, containing (adjusted) p-values for multiple pairwise hypothesis tests.

### Usage

    ## S3 method for class 'pairwise.htest'
    tidy(x, ...)

### Arguments

`x` | a "pairwise.htest" object
`...` | extra arguments (not used)

### Details

Note that in one-sided tests, the alternative hypothesis of each test can be stated as "group1 is greater/less than group2".

Note also that the columns of group1 and group2 will always be a factor, even if the original input is (e.g.) numeric.

### Value

A data frame with one row per group/group comparison, with columns

`group1` | First group being compared
`group2` | Second group being compared
`p.value` | (Adjusted) p-value of comparison

### See Also

pairwise.t.test, pairwise.wilcox.test

### Examples

    attach(airquality)
    Month <- factor(Month, labels = month.abb[5:9])
    ptt <- pairwise.t.test(Ozone, Month)
    tidy(ptt)

    attach(iris)
    ptt2 <- pairwise.t.test(Petal.Length, Species)
    tidy(ptt2)

    tidy(pairwise.t.test(Petal.Length, Species, alternative = "greater"))
    tidy(pairwise.t.test(Petal.Length, Species, alternative = "less"))

    tidy(pairwise.wilcox.test(Petal.Length, Species))

[Package broom version 0.4.1 Index]