Skip to contents

Native two-sample Wilcoxon rank-sum permutation test (morie_wilcox_test).

Usage

morie_coin_wilcoxon(formula, data, ...)

Arguments

formula

A two-sided formula y ~ group, where group is a two-level factor.

data

A data frame.

...

Further arguments forwarded to coin::wilcox_test (e.g. distribution, alternative).

Value

A list with $method, $statistic, $p.value and $raw.

Examples

if (requireNamespace("coin", quietly = TRUE)) {
  set.seed(1)
  df <- data.frame(y = rnorm(40), g = factor(rep(c("a", "b"), 20)))
  morie_coin_wilcoxon(y ~ g, data = df)
}
#> $method
#> [1] "morie Wilcoxon permutation test"
#> 
#> $raw
#> $raw$statistic
#> [1] 0.8115027
#> 
#> $raw$p.value
#> [1] 0.4170771
#> 
#> $raw$method
#> [1] "morie Wilcoxon permutation test"
#> 
#> 
#> $statistic
#> [1] 0.8115027
#> 
#> $p.value
#> [1] 0.4170771
#>