### artificial 2-sample problem
df <- data.frame(y = rnorm(20), x = gl(2, 10))
### Ansari-Bradley test
at <- ansari_test(y ~ x, data = df, distribution = "exact")
at
pvalue(at)
### bivariate 2-sample problem
df <- data.frame(y1 = rnorm(20) + c(rep(0, 10), rep(1, 10)),
y2 = rnorm(20),
x = gl(2, 10))
it <- independence_test(y1 + y2 ~ x, data = df,
distribution = approximate(B = 9999))
pvalue(it, method = "single-step")
pvalue(it, method = "step-down")
pvalue(it, method = "discrete")
Run the code above in your browser using DataLab