tidy.pairwise.htest {broom} | R Documentation |
Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies cross models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.
## S3 method for class 'pairwise.htest' tidy(x, ...)
x |
A |
... |
Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
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.
A tibble::tibble with one row per group/group comparison and columns:
group1 |
First group being compared |
group2 |
Second group being compared |
p.value |
(Adjusted) p-value of comparison |
stats::pairwise.t.test()
, stats::pairwise.wilcox.test()
,
tidy()
Other htest tidiers: augment.htest
,
tidy.htest
, tidy.power.htest
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))