Given univariate samples \(X_1~,\ldots,~X_k\), it tests $$H_0 : \mu_1 = \cdots \mu_k\quad vs\quad H_1 : \textrm{at least one equality does not hold}$$ using the procedure by Zhang and Xu (2009) by applying multivariate extension of Scheffe's method of transformation.
meank.2009ZX(dlist, method = c("L", "T"))
a list of length \(k\) where each element is a sample matrix of same dimension.
a method to be applied for the transformed problem. "L"
for \(L^2\)-norm based method, and
"T"
for Hotelling's test, which might fail due to dimensionality. Case insensitive.
a (list) object of S3
class htest
containing:
a test statistic.
\(p\)-value under \(H_0\).
alternative hypothesis.
name of the test.
name(s) of provided sample data.
Zhang J, Xu J (2009). “On the k-sample Behrens-Fisher problem for high-dimensional data.” Science in China Series A: Mathematics, 52(6), 1285--1304. ISSN 1862-2763.
## 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
#>
#> Test for Equality of Means by Zhang and Xu (2009)
#>
#> data: tinylist
#> statistic = 0.33215, p-value = 0.3699
#> alternative hypothesis: one of equalities does not hold.
#>
# \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=""))
#>
#> * Example for 'meank.2009ZX'
#> *
#> * number of rejections : 70
#> * total number of trials : 1000
#> * empirical Type 1 error : 0.07
# }