This function implements the two-sample simultaneous test on high-dimensional
mean vectors and covariance matrices using chi-squared approximation.
Suppose \(\{\mathbf{X}_1, \ldots, \mathbf{X}_{n_1}\}\) are i.i.d.
copies of \(\mathbf{X}\), and \(\{\mathbf{Y}_1, \ldots, \mathbf{Y}_{n_2}\}\)
are i.i.d. copies of \(\mathbf{Y}\).
Let \(M_{CQ}/\hat\sigma_{M_{CQ}}\) denote
the \(l_2\)-norm-based mean test statistic proposed in Chen and Qin (2010)
(see meantest.cq
for details),
and let \(T_{LC}/\hat\sigma_{T_{LC}}\)
denote the \(l_2\)-norm-based covariance test statistic
proposed in Li and Chen (2012) (see covtest.lc
for details).
The simultaneous test statistic via chi-squared approximation is defined as
$$S_{n_1, n_2} = M_{CQ}^2/\hat\sigma^2_{M_{CQ}} + T_{LC}^2/\hat\sigma^2_{T_{LC}}.$$
It has been proved that with some regularity conditions, under the null hypothesis
\(H_0: \boldsymbol{\mu}_1 = \boldsymbol{\mu}_2 \ \text{ and }
\ \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2\),
the two tests are asymptotically independent as \(n_1, n_2, p\rightarrow \infty\),
and therefore \(S_{n_1,n_2}\) asymptotically converges in distribution to
a \(\chi_2^2\) distribution.
The asymptotic \(p\)-value is obtained by
$$p\text{-value} = 1-F_{\chi_2^2}(S_{n_1,n_2}),$$
where \(F_{\chi_2^2}(\cdot)\) is the cdf of the \(\chi_2^2\) distribution.