{'fraction_non_alphanumeric': 0.05264726602720425, 'fraction_numerical': 0.023275348181867446, 'mean_word_length': 4.099765096034268, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An adaptive two-sample test for high-dimensional means

SUMMARY Several two-sample tests for high-dimensional data have been proposed recently, but they are powerful only against certain alternative hypotheses. In practice, since the true alternative hypothesis is unknown, it is unclear how to choose a powerful test. We propose an adaptive test that maintains high power across a wide range of situations and study its asymptotic properties. Its finite-sample performance is compared with that of existing tests. We apply it and other tests to detect possible associations between bipolar disease and a large number of single nucleotide polymorphisms on each chromosome based on data from a genome-wide association study. Numerical studies demonstrate the superior performance and high power of the proposed test across a wide spectrum of applications.


INTRODUCTION
Two-sample testing on the equality of two high-dimensional means is common in genomics and genetics. For instance, Chen & Qin (2010) considered analysis of differential expressions for gene sets based on microarray data. In our motivating example and other genome-wide association studies (The International Schizophrenia Consortium, 2009), polygenic testing is of interest: one would like to test whether there is any association between a disease and a large number of genetic variants, mostly single nucleotide polymorphisms. In these applications, the dimension of the data, p, is often much larger than the sample size n. Traditional multivariate two-sample tests, such as the T 2 -test of Hotelling (1931), either cannot be directly applied or have too low power. As shown theoretically in Fan (1996), as the dimension p increases, even for simple one-sample c 2016 Biometrika Trust testing on the mean of a normal distribution with a known covariance matrix σ 2 I , the standard Wald, score or likelihood ratio tests may have power that decreases to the Type I error rate as the departure from the null hypothesis increases. Several two-sample tests for high-dimensional data have been proposed (Bai & Saranadasa, 1996;Srivastava & Du, 2008;Chen & Qin, 2010;Cai et al., 2014;Gregory et al., 2015;Srivastava et al., 2015). There are two common types of testing approach when p > n: one based on the sum-of-squares of the sample mean differences and the other based on the maximum componentwise sample mean difference. The two types of tests are powerful against different alternatives: if the true mean differences are dense in the sense that there is a large proportion of small to moderate componentwise differences, then the former type is more powerful; in contrast, if the true mean differences are sparse in the sense that there are only few but large nonzero componentwise differences, the latter type of test is more powerful. In practice, however, it is unclear which should be applied. Furthermore, as will be shown in the simulation study, there are denser and intermediate situations in which neither type of test is powerful.
In this paper, we develop an adaptive testing procedure which yields high testing power against various alternative hypotheses in the high-dimensional setting. This is achieved through combining information across a class of sum-of-powers tests, including tests based on the sum-of-squares of the mean differences and the supremum mean difference. The main idea is to incorporate multiple tests in the procedure so that at least one of them would yield a high power for a particular application with unknown truth. The proposed adaptive sum-of-powers test then selects the most powerful of the candidate tests. To perform the proposed test, we establish the asymptotic null distribution of the adaptive test statistic. In particular, we derive the joint asymptotic distribution for a set of the sum-of-powers test statistics. The marginal distributions of the test statistics converge to the normal distribution or the extreme value distribution, depending on the power parameters. Based on the theoretical results, we develop a new way to calculate asymptotic p-values for the adaptive test.
We further demonstrate the superior performance of the proposed adaptive test in the context of large p and small n. We compare its performance with several existing tests which have not yet been applied to single nucleotide polymorphism data. Due to the discrete nature of single nucleotide polymorphism data, normal-based parametric tests are not suitable. In addition, although the sparsity assumption has been so widely adopted, the nonzero differences in single nucleotide polymorphism data may not be sparse, as predicted by the polygenic theory of Fisher (1918). The problem of nonsparse signals has begun to attract the attention of statisticians (e.g., Hall et al., 2014). It is highly relevant here because the performance of a test, especially a nonadaptive one, may depend on how sparse the signals are, as illustrated in the real-data analysis. An R (R Development Core Team, 2016) package highmean that implements the tests studied here is available from the Comprehensive R Archive Network, CRAN.

SOME EXISTING TESTS
Suppose that we observe two groups of p-dimensional independent and identically distributed samples {X 1i } n 1 i=1 and {X 2 j } n 2 j=1 ; we consider high-dimensional data with p n = n 1 + n 2 − 2. Let μ 1 and μ 2 denote the true mean vectors of the groups, and assume throughout that the two groups share a common covariance matrix = (σ i j ) p× p . Our primary object is to test H 0 : μ 1 = μ 2 versus H A : μ 1 | = μ 2 . In this section, we review existing two-sample tests for high-dimensional data. For k = 1, 2 letX k be the sample mean for group k, and let S = n −1 2 k=1 n k i=1 (X ki −X k )(X ki −X k ) T be the pooled sample covariance matrix. The precision matrix, i.e., the inverse of the covariance matrix, is written as = −1 . Moreover, for a vector v, we denote by v (i) its ith element.
The best-known two-sample test for low-dimensional data is the T 2 -test of Hotelling (1931), which is a generalization of the two-sample t-test for p = 1 to multivariate data with p > 1 but p n: T H = (X 1 −X 2 ) T S −1 (X 1 −X 2 ). The T 2 -test, however, is not applicable to highdimensional data because S is singular. Accordingly, some modifications have been proposed in which S is replaced by a known quantity or another estimate. A straightforward procedure is to substitute an identity matrix I for S, forming a sum-of-squares-type test, which is directly based on the L 2 -norm of the sample mean differences, X 1 −X 2 2 2 = (X 1 −X 2 ) T (X 1 −X 2 ), or its weighted version (Bai & Saranadasa, 1996;Srivastava & Du, 2008;Chen & Qin, 2010). Bai & Saranadasa (1996) proposed a test statistic and established its asymptotic normal null distribution. Chen & Qin (2010) noticed some theoretical difficulties due to the presence of the cross-product terms n k i=1 X T ki X ki in T BS , and proposed removing them to obtain a new test statistic whose asymptotic properties were established under much weaker conditions. To account for possibly varying variances of the components of the data, one may replace S by a diagonal version D S = diag(s 11 , . . . , s pp ), where s ii are the diagonal elements of S; the matrix D S is in general nonsingular. Srivastava & Du (2008) introduced such a weighted version of the sum-of-squares-type test of Bai & Saranadasa (1996): is the sample correlation matrix and c p,n = 1 + tr R 2 p −3/2 . All of the above sum-of-squares-type test statistics are asymptotically distributed as normal under H 0 . These tests are usually powerful against moderately dense alternative hypotheses, where there is a large proportion of nonzero components in the true mean differences μ 1 − μ 2 . However, if the nonzero signals are sparse, these tests lose substantial power (Cai et al., 2014). Accordingly, Cai et al. (2014) proposed a supremum-type statistic using the L ∞ -norm of the sample mean differences, i.e., where σ ii are the diagonal elements of the covariance matrix . In practice, we use the sample variances s ii to estimate the σ ii . A supremum-type statistic and a sum-of-squares-type statistic represent two extremes: the former uses only a single component as evidence against the null hypothesis, while the latter uses all of the components. Neither of the statistics will be uniformly better; they are more powerful for sparse and dense nonzero signals, respectively (Gregory et al., 2015). However, for more dense or only weakly dense nonzero signals, neither may be powerful: there may not be a single component to represent a strong departure from H 0 , whereas a sum-of-squares statistic may accumulate too much noise through summing over the zero components. To boost the power when nonzero signals are neither too dense nor too sparse, Chen et al. (2014) proposed removing estimated zero components through thresholding; since zero components are expected to give small squared sample mean differences, those smaller than a given threshold would be ignored, leading to a test statistic where the threshold level is λ p (s) = 2s log p and I (·) is the indicator function. Since an optimal choice of the threshold is unknown, Chen et al. (2014) proposed trying all possible threshold values and then choosing the most significant one as the final test statistic: whereμ T CLZ (s),0 andσ T CLZ (s),0 are estimates of the mean and standard deviation of T CLZ (s) under the null hypothesis. The asymptotic null distribution of T CLZ is an extreme value distribution.
Because of the slow convergence to the asymptotic null distribution, Chen et al. (2014) proposed using the parametric bootstrap to calculate its p-values. The test T CLZ can be regarded as an adaptive test: it uses thresholding to adapt to unknown signal sparsity. It is closely related to another adaptive test for association analysis of rare variants in genetics (Pan & Shen, 2011).
Remark 1. Sum-of-squares-type tests and supremum-type tests have also been used in analyses of genome-wide association studies with large n and small p. For example, in the framework of generalized linear models, the sum-of-squared-score test in Pan (2009) for association analysis of multiple single nucleotide polymorphisms can be regarded as a sum-of-squares-type test, while another widely used test in single nucleotide polymorphism analysis is similar to the supremum-type test of Cai et al. (2014). As shown in Pan (2011), the sum-of-squared-score test is equivalent to the variance-component-score test with a linear kernel (Wu et al., 2010) and a nonparametric multivariate analysis of variance (Wessel & Schork, 2006), both used in genetics, as well as to an empirical Bayes test for high-dimensional data (Goeman et al., 2006).
Remark 2. Cai et al. (2014) also introduced test statistics based on linearly transformed sample mean differences. Although they discussed the transformation only for their supremum-type statistic, the same transformation can be applied to other test statistics (Chen et al., 2014). However, the transformation may not work for very dense signals; for example, in some cases with more than p r nonzero signals for r > 1/2, a test using the precision matrix transformation could be outperformed by that without transformation (Cai et al., 2014). Furthermore, conducting the -transformation requires an estimate of the p × p precision matrix, which is time-consuming for large p (Gregory et al., 2015). More importantly, any test can be conducted on either the original or the transformed data, which is not a focus here. Therefore, this article does not consider data transformations.

3·1. Test statistics
We first propose a family of sum-of-powers tests, indexed by a positive integer γ . For any 1 γ < ∞, we define a sum-of-powers test statistic with power index γ as When γ = 2, this yields a sum-of-squares-type test statistic equivalent to that of Bai & Saranadasa (1996). Since, as an even γ → ∞, following the supremum-type test statistic in Cai et al. (2014) we define Thus, the class of the sum-of-powers tests includes both a sum-of-squares test and a supremumtype test as special cases. Furthermore, L(1) is like a burden test widely studied in genetic association analysis of rare variants for large n and small p (Pan & Shen, 2011;Lee et al., 2012). If nonzero signals are extremely dense with almost the same sign, then a burden test like L(1) can be more powerful than both the sum-of-squares and the supremum-type tests; see our numerical examples and § 3·3. Similarly, there are situations with only weakly dense signals, in which an L(γ ) test with 2 < γ < ∞ may be more powerful than both the sum-of-squares and the supremum-type tests. Which L(γ ) is most powerful depends on the unknown pattern of nonzero signals, such as sparsity and signal strength. Hence, we propose the following adaptive test to combine the sumof-powers tests and improve the test power: where The idea of taking the minimum p-value to approximate the maximum power has been widely used (e.g., Yu et al., 2009), but T aSPU is no longer a genuine p-value. In order to perform the proposed adaptive test, in the next section we derive the asymptotic distribution. In practice, one has to decide what candidate values of γ are to be used. From the theoretical power study in § 3·3 and the simulation study, we suggest using γ ∈ = {1, 2, . . . , γ u , ∞} with γ u = 6 or a little bigger for a larger p/n ratio.
Remark 3. Our tests for small n and large p are in the same spirit as those proposed for analysis of rare variants with large n and small p (Pan et al., 2014). Specifically, Pan et al. (2014) . . , U p ) T is the score vector for a parameter, say β, in a generalized linear model under a null hypothesis H 0 : β = 0. The SPU(γ ) test can be regarded as a weighted score test (Lin & Tang, 2011) with weights w i = U γ −1 i . In the current context, the score U becomes the sample mean difference, so we use the same name and denote the adaptive test statistic by T aSPU in (1). Apart from, the difference between the small n large p and large n small p scenarios, asymptotic results for the adaptive test have not yet been described in the literature. In this paper we derive asymptotics of the test statistics L(γ ) in the high-dimensional setting, based on which we can calculate the asymptotic p-values of L(γ ) and T aSPU .

3·2. Asymptotic theory
For simplicity, we present our results under the assumption of a common covariance matrix 1 = 2 = , although our derivations and proofs in the Supplementary Material are established without this assumption. In the following we write = (σ i j ) p× p . Under H 0 : μ 1 = μ 2 , we first derive asymptotic approximations to the mean and variance of L(γ ) for γ < ∞, denoted by μ(γ ) and σ 2 (γ ), respectively. We assume that n 1 /(n 1 + n 2 ) → ρ ∈ (0, 1) as n → ∞. We write a n ∼ b n if a n /b n = 1 + o(1) and let x denote the largest integer not greater than x.
We need the following assumptions.
Condition 2 (Mixing assumption). For a set of multivariate random vectors Condition 3 (Moment assumption). We assume that log p/n 1/4 = o(1) and Remark 4. Conditions 1 and 3 were also assumed in Cai et al. (2014), and they are needed to establish the weak convergence of L(∞). When γ < ∞, asymptotic normality can be established under weaker assumptions on the eigenvalues and correlations. However, in order to establish weak convergence of L(γ ) for γ > 2, stronger moment assumptions may be needed than those in Chen & Qin (2010), whose test statistic is similar to L(2). Condition 2 imposes weak dependence on the data. A similar mixing condition is considered in Chen et al. (2014), and such weak dependence is also commonly assumed in time series and spatial statistics. Alternatively, we may consider the weak dependence structure introduced in Bai & Saranadasa (1996) and Chen & Qin (2010), where a factor-type model for X is assumed. Since the variables in the motivating genome-wide association studies have a local dependence structure, with their correlations often decaying to zero as their physical distances on a chromosome increase, we focus on mixing-type weak dependence in this paper.
where m ki is the third central moment of the random variable in component i from group k, i.e., m ki = E{(X For any positive integers s and t with s + t even, define a set A(c 1 , c 2 , For simplicity, we write the set as A(s, t).
To derive the asymptotic joint distribution of the test statistics L(γ ), we also need the following result to approximate their correlations: corr{L(s), Now we are ready to introduce the asymptotic joint distributions for the test statistics L(γ ).
We can use Propositions 1-3 to approximate μ(γ ), σ (γ ) and ρ st , respectively, and then calculate the p-value for the proposed adaptive test. Define L O and L E as the sets consisting of standardized L(γ ) with γ odd and even, respectively, i.e., L O = {{L(γ ) − μ(γ )}/σ (γ ) : odd γ ∈ } and L E = {{L(γ ) − μ(γ )}/σ (γ ) : even γ ∈ }. By Theorem 1, L O and L E are asymptotically independent, and each is asymptotically independent of L(∞). Thus we can obtain the p-value of the adaptive test from these three sets of statistics. Consider the realizations of the test statistics, We use the function pmvnorm in the R package mvtnorm to calculate the multivariate normal tail probabilities p O and p E (R Development Core Team, 2016). Finally, we take the minimum p-value from the odd, even and infinity tests, i.e., p min = min( p O , p E , p ∞ ); then, by the asymptotic independence of L O , L E and L(∞), the asymptotic p-value for the adaptive test is p aSPU = 1 − (1 − p min ) 3 .
The above discussion focuses on the case where the covariance matrix is known. In practice, must be estimated. We can apply existing methods, such as banding and thresholding techniques, to estimate a high-dimensional sparse covariance matrix (Bickel & Levina, 2008;Rothman et al., 2010;Cai & Liu, 2011;Xue et al., 2012). In the simulation study and real-data analysis, we used the banding approach of Bickel & Levina (2008): for a sample covariance matrix S = (s i j ), the banded matrix with bandwidth k n is defined asˆ k n = {s i j I (|i − j| k n )}. Theoretical properties ofˆ k n have been studied in Bickel & Levina (2008). We used five-fold crossvalidation to select an optimal bandwidth in our simulations and real-data analysis (Bickel & Levina, 2008;Cai & Liu, 2011). Under the conditions in Theorem 1, we can show thatσ 2 (γ ) estimated based on the banded matrixˆ k n satisfiesσ 2 (γ ) = {1 + o(1)}σ 2 (γ ) for properly chosen k n . Consider the approximation ofσ (γ ) in (2). Under the weak dependence condition, Condition 2, for any i, j and > 0, there is a constant C such that σ i j Cδ |i− j| /(2+ ) (see, e.g., Guyon, 1995). Therefore, for k n → ∞ as n → ∞, the sum of terms with |i − j| > k n , i.e., In applications, the components of the observations may be measured on different scales. Therefore, we could consider an inverse variance weighted test statistic For γ = ∞, L(∞) is already weighted by the inverse variances and we let W (∞) = L(∞). To calculate the p-values for W (γ ) and the corresponding adaptive test, it is straightforward to use the asymptotic properties on the weighted samples {Y ki } n k i=1 , where Y ki = D −1/2 X ki and D = diag(σ 11 , . . . , σ pp ). In practice, we replace the unknown σ ii with the sample variances s ii . Results similar to Theorem 1 can be established.
Remark 5. For simplicity, this paper focuses on the case where two groups of samples share a common covariance matrix. More generally, the two groups may have different covariance matrices, 1 | = 2 . In this situation, one may apply a two-sample test without assuming a common covariance matrix: the definitions of the tests remain the same, while for the weighted tests, the weights for the sample mean differences become the reciprocals of the diagonal elements in 1 /n 1 + 2 /n 2 . The asymptotic properties of the proposed tests are still valid in this situation; see the Supplementary Material. Remark 6. The asymptotic independence of the sum-of-squares-and supremum-type statistics has been studied in Hsing (1995) for weakly dependent observations. Under the sparse signal alternative with 1/2 < β < 1, similar tests to the proposed L(1) and L(2) have also been studied in Zhong et al. (2013) with an additional higher criticism thresholding of the means; the asymptotic independence between the sum-of-squares-type statistics and a screening statistic by higher criticism thresholding has been studied in Fan et al. (2015). However, our study differs from theirs in several respects. First, our proposed method is adaptive and powerful for both sparse and dense signal alternatives, as shown by the theoretical and numerical results, whereas Zhong et al. (2013) and Fan et al. (2015) focus on sparse alternatives. As illustrated in the simulation, when the signals are dense, the proposed test performs better than the thresholding-type test in Chen et al. (2014). Second, we theoretically study a family of power statistics L(γ ) with different finite and infinite values of γ and establish their joint distribution; Zhong et al. (2013), on the other hand, focused on L(1)-and L(2)-type statistics and studied their performance separately, while Fan et al. (2015) considered the limiting behaviour of the summation of a sum-of-squares-type statistic and a screening statistic by higher criticism thresholding.

3·3. Asymptotic power analysis
In this section, we analyse the asymptotic power of the proposed adaptive test. Under the alternative H A : μ 1 | = μ 2 , we first derive approximations for the mean, variance and covariance functions for L(γ ) with γ < ∞, denoted respectively by μ A (γ ), σ A (γ ) and cov A {L(s),

PROPOSITION 4. Under the regularity conditions in Theorem 1 and H
where approximations for μ(·) and μ (i) (·) are given in Proposition 1. In particular, PROPOSITION 5. Under the conditions in Theorem 1 and H A , where for s = 0 or t = 0, r i j (s, t) = 0, and for s > 0 and t > 0, i j n c 1 +c 2 +c 3 1 n d 1 +d 2 +d 3 2 c 1 ! c 2 ! c 3 ! d 1 ! d 2 ! d 3 ! 2 c 1 +c 2 +d 1 +d 2 , s + t even, 3 and B(s, t) is the set of nonnegative integers (a, b, c 1 , c 2 , c 3 , d 1 , d 2 , d 3 The variance function is σ 2 We now analyse the power of the test. For the testing statistic in (1), let p * α be the critical threshold under H 0 with significance level α. The test power under H A then satisfies pr(T aSPU = min γ ∈ P SPU(γ ) < p * α ) pr(P SPU(γ ) < p * α ) for any γ ∈ . Therefore, the asymptotic power of the proposed adaptive test is 1 if there exists γ ∈ such that pr(P SPU(γ ) < p * α ) → 1, that is, if L(γ ) has asymptotic power equal to 1. Hence, to study the asymptotic power of the adaptive test, we only need to focus on the power of L(γ ) for γ ∈ .
Under the alternative, we denote the set of locations of the signals by S β = {i : δ i | = 0} and the cardinality of S β by p 1−β , where β ∈ (0, 1] is the sparsity parameter. In the following, we consider two cases: the dense signal case with β < 1/2 and the sparse signal case with β 1/2. Case 1: 0 < β < 1/2. To study the asymptotic power, we consider the local alternative with small δ i . Consider the set = \{∞}, and for any finite γ define the corresponding average standardized signal asδ(γ ) = i∈S β n γ /2 δ A proof similar to that of Theorem 1 gives the following result.

THEOREM 2. Under the conditions in Theorem 1 and the alternative H
γ ∈ converges weakly to a multivariate normal distribution with mean zero and covariance matrix R A given in Proposition 5.
Theorem 2 gives the asymptotic test power of L(γ ) at significance level p * α as where is the standard normal cumulative distribution function and z p * α is its (1 − p * α )th quantile. Since σ (γ )/σ A (γ ) is bounded under the alternative considered, the asymptotic power is mainly dominated by {μ A (γ ) − μ(γ )}/σ A (γ ). In addition, σ A (γ ) is of order p 1/2 n −γ /2 and therefore the power goes to 1 if n γ /2 {μ A (γ ) − μ(γ )}/ p 1/2 → ∞. Intuitively speaking, the power of the adaptive test converges to 1 if some of the average standardized signals are of order higher than p β−1/2 , which is o(1). For example, when γ = 1 or 2, from the derivations in Proposition 4 we have that the asymptotic power of L(1) or L(2) goes to 1 if n 1/2 i δ i / p 1/2 → ∞ or n i δ 2 i / p 1/2 → ∞, that is, ifδ(1) orδ(2) is of order higher than p β−1/2 . For different values of γ , the test statistic L(γ ) that achieves the highest power depends on the specific dense alternative. To further study the power of different test statistics L(γ ) and how to choose the set , we consider a special case where the signal strength is fixed at the same level, n 1 = n 2 , σ ii = 1 and σ i j 0. In this case, we show in the Supplementary Material that under the alternative hypothesis with small δ, the L(1) test is asymptotically more powerful than the other L(γ ) tests. On the other hand, because of the slow convergence rate to the asymptotic distribution, which depends on the value of p 1/2−β , the performance of L(1) for a finite sample may not be as good as that of L(γ ) tests with γ > 1, especially when the sparsity parameter β is close to 1/2 and p is not large enough; see the Supplementary Material. Similarly, we can show that L(2) is asymptotically more powerful if the absolute values of the δ i have the same level but the signs are random with about half being positive.
Case 2: β 1/2. The result in Case 1 implies that when β < 1/2 and γ < ∞, the test power of L(γ ) goes to 1 if n γ /2 {μ A (γ ) − μ(γ )}/ p 1/2 → ∞, which is satisfied in most cases if some average standardized signal is of order higher than p β−1/2 = o(1). However, in the sparse setting with β 1/2 and γ < ∞, L(γ ) loses power. To illustrate this, take γ = 1 and 2. For any β < 1/2, the powers of L(1) and L(2) converge to 1 ifδ(1) andδ(2) are of order higher than o(1). However, when β > 1/2, p β−1/2 → ∞ and the asymptotic powers of L(1) and L(2) are strictly less than 1 even ifδ (1) On the other hand, L(∞) is known to be powerful against sparse alternatives; therefore, the proposed adaptive sum-of-powers test still has asymptotic power equal to 1 if that of L(∞) converges to 1. The asymptotic power of L(∞) has been studied in Cai et al. (2014); from their Theorem 2, the power of L(∞) converges to 1 if max i |δ i | c(log p) 1/2 n −1/2 for a certain constant c and if the nonzero δ i are randomly uniformly sampled with sparsity level β > 3/4. The condition that β > 3/4 was assumed by the authors because of the technical difficulty in proving the asymptotic results. It is expected that the asymptotic power is still 1 for 1/2 < β 3/4 but the proof would be more challenging (Cai et al., 2014).
Combining the above theoretical arguments and simulation results, we recommend including small γ values such as 1, 2 and medium γ values such as 3, . . . , 6 in to achieve balance between the asymptotic and finite-sample performances when the signals are dense; in addition, we also recommend including ∞ in , as L(∞) is more powerful when the signals are sparse. See the Supplementary Material for more details and simulation studies.
Remark 7. When the signal is dense, β < 1/2, the L(2) test performs similarly to the tests in Bai & Saranadasa (1996) and Chen & Qin (2010). As discussed above, there are alternatives under which L(2) is not as powerful as other L(γ ) tests, and therefore in these dense signal cases, the proposed test is more powerful than those of Bai & Saranadasa (1996) and Chen & Qin (2010), as illustrated by the simulation study. When the signal is sparse, β > 1/2, the L(∞) test is equivalent to the supremum test in Cai et al. (2013), so the proposed adaptive test would perform similarly to that of Cai et al. (2013). On the other hand, under certain sparse alternatives, the L(∞) test may not be as powerful as the thresholding tests in the literature, such as the test proposed in Chen et al. (2014). To illustrate this, consider the oracle case, where the signal set S β is known and has order p 1−β with 1/2 < β < 1. Suppose that the X k are independent standard normal and signals are at the same level δ = (r log p/n) 1/2 for some large constant r . Then, the oracle test statistic with power index γ = 1, namely O n = i∈S β {X 2 }, has test power going to 1 if p 1−β → ∞. In particular, the log of the Type II error is of the order of p 1−β log p. For the L(∞) test, the log of the Type II error is of the order of log p. Therefore, in this ideal case, the O n test, which excludes nonsignal locations, is more powerful than the supremum-type test L(∞).

SIMULATIONS
In this section we compare, through simulations, the performance of the proposed adaptive method and the existing tests described in § 2. The candidate set of γ for the sum-of-powers tests L(γ ) was taken to be = {1, . . . , 6, ∞}. We generated two groups of random samples, {X 1i } n 1 i=1 and {X 2 j } n 2 j=1 , with sample sizes n 1 = n 2 = 50, from two multivariate normal distributions of dimension p = 200, so X ki ∼ N (μ k , ) for k = 1, 2. Without loss of generality, we let μ 1 = 0. Under the null hypothesis, μ 2 = 0; under the alternative hypothesis, p 1−β elements in μ 2 were set to nonzero values, where β ∈ [0, 1] controls the signal sparsity. In our simulations we used β = 0·1, . . . , 0·9, covering very dense signals for an alternative hypothesis at β = 0·1, to dense and then only moderately dense signals at β = 0·2 and 0·5, and finally to moderately sparse and very sparse signals at β = 0·7 and 0·9, respectively. The nonzero elements of μ 2 were assumed to be uniformly distributed in {1, . . . , p}, and their values were constant at {2r (1/n 1 + 1/n 2 ) log p} 1/2 , where r controls the signal strength. The common covariance matrix is = D 1/2 R D 1/2 , where R is the correlation matrix and the diagonal matrix D contains the variances. We considered various structures of R = (r i j ) and D, as detailed in the Supplementary Material. To save space, here we only show results for a first-order autoregressive correlation matrix R = (0·6 |i− j| ) and an equal-variance case with D = I p . Although this covariance matrix is only approximately bandable, we applied the banding estimator of Bickel & Levina (2008) to show the robustness of the proposed tests. For each setting, 1000 replicates were simulated to calculate the empirical Type I error and power of each test. The p-values were calculated based on both the asymptotic distributions of the tests and the permutation method with B = 1000 iterations. The nominal significance level was set to α = 0·05. Table 1 presents empirical Type I error rates and powers for β = 0·1. The results of most tests based on the asymptotics are very close to those based on permutations. This validates the results in Theorem 1. The Type I error rate and power of the thresholding test T CLZ were overestimated by the corresponding asymptotic approximation, probably due to the slow convergence to its asymptotic distribution.
Since the Type I error rates of all the tests were well controlled by their permutation-based p-values, we present the permutation-based powers in Fig. 1 to offer a fair comparison between the tests. The proposed adaptive sum-of-powers test T aSPU was much more powerful than the other tests when the signals were highly dense, with β = 0·1. When the signal sparsity increased from 0·2 to 0·4, the adaptive sum-of-powers test performed similarly to the sum-of-squares-type tests in Bai & Saranadasa (1996), Srivastava & Du (2008) and Chen & Qin (2010), and it was slightly more powerful than the thresholding test in Chen et al. (2014) and much more powerful than the supremum-type test in Cai et al. (2014). As the signals became less dense at β = 0·5, the adaptive sum-of-powers and thresholding tests were the most powerful, closely followed by the sum-of-squares-type tests and then the supremum-type test. At β = 0·6, although the adaptive sum-of-powers and thresholding tests remained the winners, the supremum-type test was more powerful than the sum-of-squares-type tests. When the signals were moderately sparse at β = 0·7, the adaptive sum-of-powers and supremum-type tests were the most powerful, closely followed by the thresholding test; they were much more powerful than the sum-of-squares-type tests. When the signals were highly sparse at β = 0·9, as expected, the supremum-type test became the sole winner, and the powers of the sum-of-squares-type and thresholding tests dropped substantially; however, the power of the adaptive sum-of-powers test remained high, close to that of the winner, the supremum-type test.
We obtained similar results for other simulation settings, including a more extreme case with a compound symmetric R and unequal variances D for multivariate normal data, and for simulated single nucleotide polymorphism data; see the Supplementary Material. In summary, owing to its adaptivity, the adaptive sum-of-powers test either achieved the highest power or had power close to that of the winner in any setting; it performed consistently well across all the situations. The banding estimator performed well, although occasionally the asymptotic adaptive sum-of-powers test would have slightly inflated Type I error rates when the assumptions in § 3·2 were severely violated.

REAL-DATA ANALYSIS
We applied the various tests to the bipolar disorder dataset from a genome-wide association study collected by The Wellcome Trust Case Control Consortium (2007). We used their quality control procedure to screen the subjects and obtained n 1 = 2938 controls and n 2 = 1868 cases. We filtered out all the single nucleotide polymorphisms with minor allele frequency lower than 0·05 and those with Hardy-Weinberg equilibrium test p-value less than 10 −5 in either cases or controls, giving 354 796 variables in total. To obtain a set of single nucleotide polymorphisms in approximate linkage equilibrium, as in the work of The International Schizophrenia Consortium (2009), we used the software PLINK (Purcell et al., 2007) to prune them with a criterion of linkage disequilibrium r 2 0·1, a sliding window covering 200 single nucleotide polymorphisms, and a moving step of 20; this yielded 42 092 remaining single nucleotide polymorphisms. As The International Schizophrenia Consortium (2009) has shown that for bipolar disorder there is strong evidence of polygenic effects, we applied the various tests to the single nucleotide polymorphisms in each of the 22 autosomes separately to better demonstrate the possible power differences between the tests. The familywise nominal significance level was set at 0·05, and it would be 0·05/22 = 0·00227 for each chromosome after Bonferroni adjustment. This indicates that 10 000 permutations should be sufficient to yield a possibly significant p-value to reject the null hypothesis.
We calculated both asymptotics-and permutation-based p-values for each test. To save space, Table 2 shows only some representative results. Most of the asymptotics-based p-values of the proposed sum-of-powers and adaptive tests were similar to their permutation-based ones, indicating good approximations. Again, the thresholding test T CLZ produced asymptotics-based pvalues that were far more significant than the permutation-based ones for most chromosomes, indicating its poor approximation. The test of Srivastava & Du (2008) also performed poorly; it always gave asymptotic p-values less than 0·0001. To avoid potentially poor asymptotic approximations, we use the permutation-based p-values to compare the various tests. In chromosomes 1, 2, 3, 6, 7, 9, 14, 15 and 16, both the sum-of-squares-type tests and the adaptive sum-of-powers test gave p-values less than 0·05/22 = 0·00227. In contrast, the thresholding test yielded significant p-values for only five of those chromosomes, while the supremum-type test was not significant for any chromosome. These results were presumably due to dense signals in these chromosomes, thus favouring the sum-of-squares-type tests. However, in other situations the sum-of-squarestype tests might not perform well. For example, for chromosome 13, only the sum-of-powers test L(γ ) with γ = 4 gave a significant p-value. Another example is chromosome 18: perhaps due to sparse signals, the supremum-type test gave the most significant p-value, but none of the sum-of-squares-type tests yielded even marginal significance; borrowing strength from the supremum-type test, i.e., L(∞), the p-value of the adaptive sum-of-powers test was marginally significant. In summary, owing to its adaptivity, the proposed adaptive test retained high power across various chromosomes with varying association patterns.