# Optimal Concordant Tests
## 2 Methods
### Optimal Concordant Test  
For a given set of one-sided \(p\)-values, the class of concordant tests, \(T_{\mathrm{G}\left(\alpha\right)}^{C}\), proposed in the previous section, Section 2.2, with different \(\alpha\) values can be applied. However, in order to control type I error, the \(\alpha\) value must be chosen before we see the data. But usually, the optimal value is unknown, and therefore how to choose an optimal value for \(\alpha\) iscritical in practice. We may choose a set of \(\alpha\) values to apply the tests \(T_{G(\alpha)}^{C}\) to the data and then use the smallest \(p\)-value among them. There are two limitations associated with this procedure. First, we need to adjust for multiple comparisons, which may result in power loss. Second, the final result will depend on the chosen \(\alpha\) values; it might be difficult to determine those values. To circumvent these difficulties, we propose to estimate the optimal \(\alpha\) value from the data, and therefore an asymptotically optimal concordant test can be constructed accordingly. In this subsection, we make the following assumption: \(P_{1},P_{2},\cdots,P_{n}\) are independently and identically distributed \((iid)\) with the following density function for parameters \(\alpha>0\) and \(c<1\):  
\[f_{\alpha,c}(p)=(1-c)^{\alpha}\text{exp}\Big{[}cF_{G(\alpha)}^{-1}(1-p)\Big{]} \quad\text{ for }p\in(0,1). \tag{5}\]  
For the above density function, \(f_{\alpha,c}(p)\), it is not difficult to show that when \(c=0\), \(f_{\alpha,0}(p)=1\) (\(0<p<1\)). Therefore, \(f_{\alpha,0}(p)\) corresponds to the global null hypothesis. In addition, we have the following property [10]. **Proposition 1**. : _Suppose that \(P_{1},P_{2},\cdots,P_{n}\) are iid with the common density function defined in (5) with parameters \(\alpha>0\) and \(c<1\). If both \(\alpha\) and \(c\) are known, then the gamma distribution-based test, \(T_{G(\alpha)}\), is uniformly most powerful (UMP)._  
When both parameters \(\alpha\) and \(c\) in (5) are unknown, they can be estimated via the constrained maximum likelihood estimation (CMLE), from which the following constrained likelihood ratio test (CLRT) can be defined:  
\[T_{CLRT}(P_{1},\cdots,P_{n})=2\hat{\alpha}_{CLRT}n\text{ln}(1-\hat{c}_{CLRT}) +2(\hat{c}_{CLRT})\sum_{i=1}^{n}F_{G(\hat{\alpha}_{CLRT})}^{-1}(1-P_{i}), \tag{6}\]  
where \(\hat{\alpha}_{CLRT}\) and \(\hat{c}_{CLRT}\) are the CMLEs for parameters \(\alpha\) and \(c\), respectively, through maximizing the log-likelihood function \(l(\alpha,c)=n\text{a}\text{ln}(1-c)+c\sum_{i=1}^{n}F_{G(\alpha)}^{-1}(1-P_{i})\) with the constrains \(c<1\) and \(\alpha>0\). For the above CLRT-based test, \(T_{CLRT}\), we have the following result [10; 14]. **Proposition 2**. : _The asymptotic distribution of the test \(T_{CLRT}\) is a mixture of chi-square distributions, \(\sum_{i=0}^{2}w_{i}\chi_{i}^{2}\), where \(\chi_{i}^{2}\) is the chi-square distribution with \(df=i\); \(\chi_{0}^{2}\) is the random variable with probability 1 of being 0; and the weights \(w_{0}\), \(w_{1}\), and \(w_{2}\) are determined by the null and the alternative hypothesis._  
The above asymptotic result may not be directly applicable to estimate the \(p\)-value for this test. First, the number of \(p\)-values, \(n\), is usually small, and the asymptotic result may not provide approximate solutions. Second and more seriously, the above weights, \(w_{i}^{\prime}s\), are difficult to obtain. Hence, here we use a simple resampling method to approximate the null distribution and to estimate the \(p\)-value of \(T_{CLRT}\). More specifically, for a given sample size \(n\), we randomly sample \(n\) independent null \(p\)-values from the uniform distribution U(0,1) and then calculate the test statistic using (6).