# Just for demonstration calculate univariate two-sample statistics separately
x1 <- rnorm(100)
x2 <- rnorm(100, mean = 0.5)
MD(x1, x2)
tStat(x1, x2)
if(requireNamespace("pROC", quietly = TRUE)) {
AUC(x1, x2)
}
# Draw some multivariate data for the DiProPerm test
X1 <- matrix(rnorm(1000), ncol = 10)
X2 <- matrix(rnorm(1000, mean = 0.5), ncol = 10)
# Perform DiProPerm test
# Note: For real applications, n.perm should be set considerably higher
# Low values for n.perm chosen for demonstration due to runtime
# \donttest{
if(requireNamespace("DWDLargeR", quietly = TRUE)) {
DiProPerm(X1, X2, n.perm = 10, stat.fun = MD)
DiProPerm(X1, X2, n.perm = 10, stat.fun = tStat)
if(requireNamespace("pROC", quietly = TRUE)) {
DiProPerm(X1, X2, n.perm = 10, stat.fun = AUC, direction = "greater")
}
}
# }
Run the code above in your browser using DataLab