## CRAN-purpose small example
tinylist = list()
for (i in 1:3){ # consider 3-sample case
tinylist[[i]] = matrix(rnorm(10*3),ncol=3)
}
meank.2009ZX(tinylist) # run the test
# \donttest{
## test when k=5 samples with (n,p) = (100,20)
## empirical Type 1 error
niter = 1000
counter = rep(0,niter) # record p-values
for (i in 1:niter){
mylist = list()
for (j in 1:5){
mylist[[j]] = matrix(rnorm(100*10),ncol=10)
}
counter[i] = ifelse(meank.2009ZX(mylist, method="L")$p.value < 0.05, 1, 0)
}
## print the result
cat(paste("\n* Example for 'meank.2009ZX'\n","*\n",
"* number of rejections : ", sum(counter),"\n",
"* total number of trials : ", niter,"\n",
"* empirical Type 1 error : ",round(sum(counter/niter),5),"\n",sep=""))
# }
Run the code above in your browser using DataLab