Native conditional permutation test of independence
(morie_indep_test) between a response and covariate.
Arguments
- formula
A model formula, e.g.
y ~ x | block.- data
A data frame.
- ...
Further arguments forwarded to
coin::independence_test(e.g.distribution,teststat,ytrafo,xtrafo).
Examples
if (requireNamespace("coin", quietly = TRUE)) {
set.seed(1)
df <- data.frame(y = rnorm(40), g = factor(rep(c("a", "b"), 20)))
morie_coin_independence(y ~ g, data = df)
}
#> $method
#> [1] "morie independence permutation test"
#>
#> $raw
#> $raw$statistic
#> [1] 1.057483
#>
#> $raw$p.value
#> [1] 0.290291
#>
#> $raw$method
#> [1] "morie independence permutation test"
#>
#>
#> $statistic
#> [1] 1.057483
#>
#> $p.value
#> [1] 0.290291
#>
