Tadaa, Wilcoxon!

tadaa_wilcoxon(data, response, group, direction = "two.sided",
  paired = FALSE, print = c("df", "console", "html", "markdown"), ...)

Arguments

data

A data.frame.

response

The response variable (dependent).

group

The group variable, usually a factor.

direction

Test direction, like alternative in t.test.

paired

If TRUE, a paired test is performed, defaults to FALSE.

print

Print method, default df: A regular data.frame. Otherwise passed to pixiedust::sprinkle_print_method for fancyness.

...

Further arguments passed to stats::wilcox.test, e.g. correct = FALSE.

Value

A data.frame by default, otherwise dust object, depending on print.

See also

Other Tadaa-functions: tadaa_aov, tadaa_chisq, tadaa_kruskal, tadaa_levene, tadaa_nom, tadaa_normtest, tadaa_one_sample, tadaa_ord, tadaa_pairwise_gh, tadaa_pairwise_tukey, tadaa_pairwise_t, tadaa_t.test

Examples

set.seed(42) df <- data.frame(x = runif(100), y = sample(c("A", "B"), 100, TRUE)) tadaa_wilcoxon(df, x, y)
#> diff median1 median2 statistic p.value #> 1 -0.13350723 0.4631841 0.59669132 1101 0.36483438 #> method alternative #> 1 Wilcoxon rank sum test with continuity correction two.sided
df <- data.frame(x = runif(100), y = c(rep("A", 50), rep("B", 50))) tadaa_wilcoxon(df, x, y, paired = TRUE)
#> diff median1 median2 statistic p.value #> 1 0.093360107 0.44705356 0.35369345 676 0.71374986 #> method alternative #> 1 Wilcoxon signed rank test with continuity correction two.sided