tadaa_wilcoxon: Tadaa, Wilcoxon!

Description Usage Arguments Value See Also Examples

View source: R/tadaa_two_sample.R

Description

Tadaa, Wilcoxon!

Usage

1
2
3
4
5
6
7
8
9
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_one_sample(), tadaa_ord(), tadaa_pairwise_tukey(), tadaa_pairwise_t(), tadaa_t.test()

Examples

1
2
3
4
5
6
set.seed(42)
df <- data.frame(x = runif(100), y = sample(c("A", "B"), 100, TRUE))
tadaa_wilcoxon(df, x, y)

df <- data.frame(x = runif(100), y = c(rep("A", 50), rep("B", 50)))
tadaa_wilcoxon(df, x, y, paired = TRUE)

Example output

# A tibble: 1 x 7
    diff median1 median2 statistic p.value method                    alternative
   <dbl>   <dbl>   <dbl>     <dbl>   <dbl> <chr>                     <chr>      
1 -0.134   0.463   0.597      1101   0.365 Wilcoxon rank sum test w~ two.sided  
# A tibble: 1 x 7
    diff median1 median2 statistic p.value method                    alternative
   <dbl>   <dbl>   <dbl>     <dbl>   <dbl> <chr>                     <chr>      
1 0.0934   0.447   0.354       676   0.714 Wilcoxon signed rank tes~ two.sided  

tadaatoolbox documentation built on July 2, 2020, 2:30 a.m.