get_pairwise_letters: Get letters to indicate results of multiple...

get_pairwise_lettersR Documentation

Get letters to indicate results of multiple comparisons/post-hoc tests

Description

This takes the results of multiple comparisons and returns a set of letters that can be used to indicate which differences are significant. The difference between levels that are assigned the same letter are not statistically different.

Usage

get_pairwise_letters(tests, alpha_level = 0.05, p.adjust.method = "none")

Arguments

tests

Either a tibble with the result of comparisons, including x and y (the levels/groups that were compared) and p_value for the comparison or an object of class pairwise.htest, for example returned from pairwise.t.test()

alpha_level

The level of significance for the test

p.adjust.method

One of p.adjust.methods, defaults to none as p-values will typically have been adjusted when carrying out the pairwise comparisons/post-hoc tests

Value

A tibble with columns that indicate which letter has been assigned to each group/level

Source

Algorithm based on https://www.tandfonline.com/doi/abs/10.1198/1061860043515

Examples

data("airquality")
airquality$month <- factor(airquality$Month, labels = month.abb[5:9])
x <- pairwise.t.test(airquality$Ozone, airquality$Month)

get_pairwise_letters(x)

LukasWallrich/timesaveR documentation built on Nov. 29, 2024, 4:47 a.m.