| test.tmulti | R Documentation |
Performs multiple pairwise comparisons using Student's t-test or Mann-Whitney test, with automatic diagnostics, effect sizes, confidence intervals, multiple testing correction and visualization.
test.tmulti(
...,
comparisons = NULL,
title = "Multiple comparisons (t / MW)",
xlab = "",
ylab = "Value",
style = c("boxplot", "violin", "mono", "halfeye"),
p_adjust = c("none", "holm", "BH", "bonferroni"),
help = FALSE,
verbose = TRUE
)
... |
Numeric vectors or a data.frame with groups in columns. |
comparisons |
List of character vectors specifying pairwise comparisons (e.g. list(c("A","B"), c("B","C"))). If NULL, all pairwise combinations are used. |
title |
Plot title. |
xlab |
X-axis label. |
ylab |
Y-axis label. |
style |
Plot style. One of "boxplot", "violin", "mono", or "halfeye". |
p_adjust |
Method for multiple testing correction. One of "none", "holm", "BH", "bonferroni". |
help |
Logical. If TRUE, prints usage examples. |
verbose |
Logical. If TRUE, prints results and plots. |
Normality is assessed using Shapiro-Wilk tests and homogeneity of variances using Levene's test. If assumptions are met, a pooled-variance t-test is used. Otherwise, the Mann-Whitney test is applied with bootstrap confidence intervals.
Effect sizes:
Cohen's d for t-tests
Rank-biserial correlation for Mann-Whitney
A list with:
A tibble with test results.
A ggplot object.
Long-format data used for plotting.
df <- data.frame(
control = rnorm(30, 10),
treatment = rnorm(30, 12),
test1 = rnorm(30, 11),
test2 = rnorm(30, 15)
)
test.tmulti(
df,
comparisons = list(
c("control", "treatment"),
c("treatment", "test1")
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.