This function implements the two-sample PE covariance test via
Fisher's combination.
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 \(p_{LC}\) and \(p_{CLX}\) denote the \(p\)-values associated with
the \(l_2\)-norm-based covariance test (see covtest.lc
for details)
and the \(l_\infty\)-norm-based covariance test
(see covtest.clx
for details), respectively.
The PE covariance test via Fisher's combination is defined as
$$T_{Fisher} = -2\log(p_{LC})-2\log(p_{CLX}).$$
It has been proved that with some regularity conditions, under the null hypothesis
\(H_{0c}: \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2,\)
the two tests are asymptotically independent as \(n_1, n_2, p\rightarrow \infty\),
and therefore \(T_{Fisher}\) asymptotically converges in distribution to a \(\chi_4^2\) distribution.
The asymptotic \(p\)-value is obtained by
$$p\text{-value} = 1-F_{\chi_4^2}(T_{Fisher}),$$
where \(F_{\chi_4^2}(\cdot)\) is the cdf of the \(\chi_4^2\) distribution.