Given two multivariate data \(X\) and \(Y\) of same dimension, it tests $$H_0 : \mu_x = \mu_y\quad vs\quad H_1 : \mu_x \neq \mu_y$$ using the procedure by Thulin (2014) using random subspace methods. We did not enable parallel computing schemes for this in that it might incur huge computational burden since it entirely depends on random permutation scheme.

mean2.2014Thulin(X, Y, B = 100, nreps = 1000)

Arguments

X

an \((n_x \times p)\) data matrix of 1st sample.

Y

an \((n_y \times p)\) data matrix of 2nd sample.

B

the number of selected subsets for averaging. \(B\geq 100\) is recommended.

nreps

the number of permutation iterations to be run.

Value

a (list) object of S3 class htest containing:

statistic

a test statistic.

p.value

\(p\)-value under \(H_0\).

alternative

alternative hypothesis.

method

name of the test.

data.name

name(s) of provided sample data.

References

Thulin M (2014). “A high-dimensional two-sample test for the mean using random subspaces.” Computational Statistics & Data Analysis, 74, 26--38. ISSN 01679473.

Examples

## CRAN-purpose small example
smallX = matrix(rnorm(10*3),ncol=10)
smallY = matrix(rnorm(10*3),ncol=10)
mean2.2014Thulin(smallX, smallY, B=10, nreps=10) # run the test
#> 
#> 	Two-sample Test for Multivariate Means by Thulin (2014)
#> 
#> data:  smallX and smallY
#> T2 = 16.154, p-value = 0.2
#> alternative hypothesis: true means are different.
#> 

# \donttest{
## Compare with 'mean2.2011LJW' 
## which is based on random projection.
n = 33    # number of observations for each sample
p = 100   # dimensionality

X = matrix(rnorm(n*p), ncol=p)
Y = matrix(rnorm(n*p), ncol=p)

## run both methods with 100 permutations
mean2.2011LJW(X,Y,nreps=100,method="m")  # 2011LJW requires 'm' to be set.
#> 
#> 	Two-sample Test for Multivariate Means by Lopes, Jacob, and Wainwright
#> 	(2011)
#> 
#> data:  X and Y
#> T2 = 80.937, p-value = 0.3
#> alternative hypothesis: true means are different.
#> 
mean2.2014Thulin(X,Y,nreps=100)
#> 
#> 	Two-sample Test for Multivariate Means by Thulin (2014)
#> 
#> data:  X and Y
#> T2 = 64.37, p-value = 0.56
#> alternative hypothesis: true means are different.
#> 
# }