Reproduces coin::independence_test for a numeric response and
covariate (scalar linear statistic, asymptotic normal reference).
Examples
if (requireNamespace("coin", quietly = TRUE)) {
set.seed(1)
df <- data.frame(y = rnorm(40), g = factor(rep(c("a", "b"), 20)))
str(morie_indep_test(y ~ g, df), max.level = 1)
}
#> List of 3
#> $ statistic: num 1.06
#> $ p.value : num 0.29
#> $ method : chr "morie independence permutation test"
