Skip to contents

Native one-way (Fisher-Pitman) permutation test (morie_oneway_test), the permutation ANOVA.

Usage

morie_coin_oneway(formula, data, ...)

Arguments

formula

A formula y ~ group, where group is a (multi-level) factor.

data

A data frame.

...

Further arguments forwarded to coin::oneway_test (e.g. distribution, teststat).

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_oneway(y ~ g, data = df)
}
#> $method
#> [1] "morie one-way permutation test"
#> 
#> $raw
#> $raw$statistic
#> [1] 1.057483
#> 
#> $raw$df
#> [1] 1
#> 
#> $raw$p.value
#> [1] 0.290291
#> 
#> $raw$method
#> [1] "morie one-way permutation test"
#> 
#> 
#> $statistic
#> [1] 1.057483
#> 
#> $p.value
#> [1] 0.290291
#>