# NOT RUN {
set.seed(123)
x = matrix(rnorm(70000),nrow=7) #creating homogeneous Gaussian dataset
res = is_homo3(data=x)
res
#uncomment to run
# x = matrix(rnorm(18000),nrow=18)
# x[1:5,] = x[1:5,]+0.5 #Heterogeneous dataset (first 5 samples have different mean)
# x[6:9,] = x[6:9,]+1.5
# res = is_homo3(data=x)
# res
# md = as.matrix(dist(x)^2) #squared Euclidean distances for the same data
# res = is_homo3(md) # uncomment to run
# Multidimensional sacling plot of distance matrix
#fit <- cmdscale(md, eig = TRUE, k = 2)
#x <- fit$points[, 1]
#y <- fit$points[, 2]
#plot(x,y, main=paste("Homogeneity test: p-value =",res$p.MaxTest))
# }
Run the code above in your browser using DataLab