MC.test2 calculates a permutation of test statistics from an pooled variance t-test. It compares this distribution to an initial test statistic calculated using non-permuted data to derive a p-value.MC.test(Y,X, perm = 1000, alternative = c("less", "greater", "not.equal"))"less","greater", or "not.equal". These provide lower-tail, upper-tail, and two-tailed tests.oneway_test from the library coin since it is based on an equivalent test statistic. The function oneway_test allows additional options including blocking.t.testY<-c(runif(100,1,3),runif(100,1.2,3.2))
X<-factor(c(rep(1,100),rep(2,100)))
MC.test(Y,X,alternative="less")Run the code above in your browser using DataLab