# Testing Homogeneity in a Semiparametric Two-Sample Problem

Authors: Yukun Liu; Pengfei Li; Yuejiao Fu
Journal: Journal of Probability and Statistics
 (2012)

---

## Abstract

We study a two-sample homogeneity testing problem, in which one sample comes from a population with densityf(x) and the other is from a mixture population with mixture density (1−λ)f(x)+λg(x). This problem arises naturally from many statistical applications such as test for partial differential gene expression in microarray study or genetic studies for gene mutation. Under the semiparametric assumption g(x)=f(x)eα+βx, a penalized empirical likelihood ratio test could be constructed, but its implementation is hindered by the fact that there is neither feasible algorithm for computing the test statistic nor available research results on its theoretical properties. To circumvent these difficulties, we propose an EM test based on the penalized empirical likelihood. We prove that the EM test has a simple chi-square limiting distribution, and we also demonstrate its competitive testing performances by simulations. A real-data example is used to illustrate the proposed methodology.


---

## Body

## 1. Introduction

Letx1,…,xn0 be a random sample from a population with distribution function F, and let y1,…,yn1 be a random sample from a population with distribution function H. Testing whether the two populations have the same distribution, that is, H0:F=H versus H1:F≠H, with both F and H completely unspecified, will require a nonparametric test. Since H1:F≠H is a very broad hypothesis, many times one may want to consider some more specified alternative, for example, the two populations only differ in location. In the present paper, we will consider a specified alternative in which one of the two samples has a mixture structure. More specifically, we have(1.1)x1,…,xn0~i.i.d.f(x),y1,…,yn1~i.i.d.h(y)=(1-λ)f(y)+λg(y),
where f(x)=dF(x)/dx, g(y)=dG(y)/dy, h(y)=dH(y)/dy, and λ∈(0,1) is an unknown parameter sometimes called contamination proportion. The problem of interest is to test H0:f=h or equivalently λ=0. This particular two-sample problem arises naturally in a variety of statistical applications such as test for partial differential gene expression in microarray study, genetic studies for gene mutation, case-control studies with contaminated controls, or the test of a treatment effect in the presence of nonresponders in biological experiments (see Qin and Liang [1] for details).If no auxiliary information is available, this is merely the usual two-sample goodness-of-fit problem. There has been extensive literature on it; see Zhang [2] and references therein. However, these tests are not suitable for the specific alternative with a mixture structure as they might be inferior comparing with methods that are designed for the specific alternative. In this paper, we will propose an empirical likelihood-based testing procedure for this specific mixture alternative under Anderson’s semiparametric assumption [3]. Motivated by the logistic regression model, the semiparametric assumption proposed by Anderson [3] links the two distribution functions F and G through the following equation:(1.2)log⁡g(x)f(x)=α+βx,
where α and β are both unknown parameters. There are many examples where the logarithm of the density ratio is linear in the observations.Example 1.1.
LetF and G be the distribution functions of Binomial (m,p1) and Binomial (m,p2), respectively. We refer the densities f and g to the probability mass functions corresponding to F and G, respectively. Then,
(1.3)log⁡g(x)f(x)=mlog⁡{1-p21-p1}+log⁡{p2(1-p1)p1(1-p2)}x.Example 1.2.
LetF be the distribution function of N(μ1,σ2) and G  the distribution function of N(μ2,σ2). Then,
(1.4)log⁡g(x)f(x)=12σ2(μ12-μ22)+1σ2(μ2-μ1)x.
In practice, one may need to apply some sort of transformation to the data (e.g., logarithm transformation) in order to justify the use of the semiparametric model assumption (1.2).Example 1.3.
LetF and G be the distribution functions of logN(μ1,σ2) and logN(μ2,σ2), respectively. It is clear that the density ratio is a linear function of the log-transformed data:
(1.5)log⁡g(x)f(x)=12σ2(μ12-μ22)+1σ2(μ2-μ1)log⁡x.Example 1.4.
LetF and G be the distribution functions of Gamma(m1,θ) and Gamma(m2,θ), respectively. In this case,
(1.6)log⁡g(x)f(x)=log⁡{Γ(m1)Γ(m2)}+(m1-m2)log⁡θ+(m2-m1)log⁡x.The semiparametric modeling assumption (1.2) is very flexible and has the advantage of not putting any specific restrictions on the functional form of f. Under this assumption, various approaches have been proposed to test homogeneity in the two-sample problem (see [1, 4, 5] and references therein). This paper adds to this literature by introducing a new type of test statistics which are based on the empirical likelihood [6, 7].The empirical likelihood (EL) is a nonparametric likelihood method which has many nice properties paralleling to the likelihood methods, for example, it is range-preserving, transform-respect, Bartlett correctable, and a systematic approach to incorporating auxiliary information [8–11]. In general, if the parameters are identifiable, the empirical likelihood ratio (ELR) test has a chi-square limiting distribution under null hypothesis. However, for the aforementioned testing problem, the parameters under H0 are not identifiable, which results in an intractable null limiting distribution for the ELR test. To circumvent this problem, we would add a penalty to the log EL to penalize λ being too close to zero. Working like a soft threshold, the penalty makes the parameters roughly identifiable. Intuitively, the penalized (or modified) ELR test should restore the usual chi-square limiting distribution. Unfortunately two things hinder the direct use of the penalized ELR test. One is that, to the best of our knowledge, there is no feasible algorithm to compute the penalized ELR test statistic. The other one is that there has been no research on the asymptotic properties of the penalized ELR test. Therefore, one cannot obtain critical values for the penalized ELR test regardless through simulations or an asymptotic reference distribution. We find that the EM test [12, 13] based on the penalized EL is a nice solution to the testing problem.The remainder of this paper is organized as follows. In Section2, we introduce the ELR and the penalized ELR. The penalized EL-based EM test is given in Section 3. A key computational issue of the EM test is discussed in Section 4. Sections 5 and 6 contain a simulation study and a real-data application, respectively. For clarity, all proofs are postponed to the appendix.


## 2. Empirical Likelihood

Let{t1,…,tn0,tn0+1,…,tn}={x1,…,xn0,y1,…,yn1} denote the combined two-sample data, where n=n0+n1. Under Anderson’s semiparametric assumption (1.2), the likelihood of two-sample data (1.1) is(2.1)L=∏i=1n0dF(ti)∏j=n0+1n[1-λ+λeα+βtj]dF(tj).
Let ph=dF(th), h=1,…,n. The EL is just the likelihood L with constraints ph≥0, ∑h=1nph=1 and ∑h=1nph(eα+βth-1)=0. The corresponding log-EL is(2.2)l=∑h=1nlog⁡ph+∑j=1n1log⁡[1-λ+λeα+βyj].
We are interested in testing(2.3)H0:λ=0or(α,β)=(0,0).
Under the null hypothesis, the constraint ∑h=1nph(eα+βth-1)=0 will always hold and supH0l=-nlogn. Under alternative hypothesis, for any fixed (λ,α,β), maximizing l with respect to ph’s leads to the log-EL function of (λ,α,β):(2.4)l(λ,α,β)=-∑h=1nlog⁡[1+ξ(eα+βth-1)]-nlog⁡n+∑j=1n1log⁡[1-λ+λeα+βyj],
where ξ is the solution to the following equation:(2.5)∑h=1neα+βth-11+ξ(eα+βth-1)=0.
Hence, the EL ratio function R(λ,α,β)=2{l(λ,α,β)+nlogn} and the ELR is denoted as R=supR(λ,α,β).The null hypothesisH0 holds for λ=0 regardless of (α,β), or (α,β)=(0,0) regardless of λ. This implies that the parameter (λ,α,β) is not identifiable under H0, resulting in rather complicated asymptotic properties of the ELR. One may consider the modified or penalized likelihood method [14] and define the penalized log-EL function pl(λ,α,β)=l(λ,α,β)+log(λ). Accordingly the penalized EL ratio function is
(2.6)pR(λ,α,β)=2{pl(λ,α,β)-pl(1,0,0)}=-2∑h=1nlog⁡[1+ξ(eα+βth-1)]+2∑j=1n1log⁡(1-λ+λeα+βyj)+2log⁡(λ),
where ξ is the solution to (2.5). The penalty function log(λ) goes to -∞ as λ approaches 0. Therefore, λ is bounded away from 0, and the null hypothesis in (2.3) then reduces to (α,β)=(0,0). That is, the parameters in the penalized log-EL function is asymptotically identifiable. However, the asymptotic behavior of the penalized ELR test is still complicated. Meanwhile, the computation of the penalized ELR test statistic is another obstacle of the implementation of the penalized ELR method. No feasible and stable algorithm has been found for this purpose. An EL-based EM test proposed in this paper provides an efficient way to solve the problem.


## 3. EL-Based EM Test

Motivated by Chen and Li [12] and Li et al. [13], we propose an EM test based on the penalized EL to test the hypothesis (2.3). The EM test statistics are derived iteratively. We first choose a finite set of Λ={λ1,…,λL}⊂(0,1], for instance, Λ={0.1,0.2,…,0.9,1.0}, and a positive integer K (2 or 3 in general). For each l=1,…,L, we proceed the following steps.Step 1.
Letk=1 and λl(k)=λl. Calculate (αl(k),βl(k))=argmaxα,βpR(λl(k),α,β).Step 2.
Update(λ,α,β) by using the following algorithm for K-1 times.
Substep 2.1.
Calculate the posterior distribution,(3.1)wjl(k)=λl(k)exp⁡(αl(k)+βl(k)yj)1-λl(k)+λl(k)exp⁡(αl(k)+βl(k)yj),j=1,…,n1,
and update λ by
(3.2)λl(k+1)=argmax⁡λ{∑j=1n1(1-wjl(k))log⁡(1-λ)+∑j=1n1wjl(k)log⁡(λ)+log⁡(λ)}.
Substep 2.2.
Update(α,β) by (αl(k+1),βl(k+1))=argmaxα,βpR(λl(k+1),α,β).
Substep 2.3.
Letk=k+1 and continue.Step 3.
Define the test statisticsMn(K)(λl)=pR(λl(K),αl(K),βl(K)).The EM test statistic is defined as(3.3)EMn(K)=max⁡{Mn(K)(λl),l=1,…,L}.
We reject the null hypothesis H0 when the EM test statistic is greater than some critical value determined by the following limiting distribution.Theorem 3.1.
Supposeρ=n1/n∈(0,1) is a constant. Assume the null hypothesis H0 holds and E(th)=0 and Var(th)=σ2∈(0,∞) for h=1,…,n. For l=1,…,L and any fixed k, it holds that
(3.4)λl(k)-λl=op(1),αl(k)=Op(n-1),βl(k)=y̅-x̅λlσ2+op(n-1/2),
where x̅=(1/n0)∑i=1n0xi and y̅=(1/n1)∑j=1n1yj.Remark 3.2.
The assumptionEth=0 is only for convenience purpose and unnecessary. Otherwise, we can replace th and α with th-E(th) and α+βE(th).Theorem 3.3.
Assume the conditions of Theorem3.1 hold and 1∈Λ.  Under the null hypothesis (2.3), EMn(K)→χ12 in distribution, as n→∞.We finish this section with an additional remark.Remark 3.4.
We point out that the idea of the EM-test can also be generalized to more general models such aslog(g(x)/f(x))=α+β1x+⋯+βkxk for some integer k or log(g(x)/f(x))=α+β1t1(x)+⋯+βktk(x)with ti(·)’s being known functions.


## 4. Computation of the EM Test

A key step of the EM test procedure is to maximizepR(λ,α,β) with respect to (α,β) for fixed λ. In this section, we propose a computation strategy which provides stable solution to this optimization problem. Throughout this section, λ is suppressed to be fixed.The objective function ispR(λ,α,β)=G(ξ*,α,β) where(4.1)G(ξ,α,β)=-2∑h=1nlog⁡[1+ξ(eα+βth-1)]+2∑j=1n1log⁡[1-λ+λeα+βyj]+2log⁡(λ)
and ξ*=ξ*(α,β) is the solution to(4.2)∂G∂ξ=-2∑h=1neα+βth-11+ξ(eα+βth-1)=0.
If (α,β) is the maximum point of pR(λ,α,β), it should generally satisfy(4.3)∂G∂α=-2∑h=1nξeα+βth1+ξ(eα+βth-1)+2∑j=1n1λeα+βyj1-λ+λeα+βyj=0.
Combining (4.2) and (4.3) leads to(4.4)ξ=1n∑j=1n1λeα+βyj1-λ+λeα+βyj.
Putting this expression of ξ back into (4.1), we have a new function(4.5)H(α,β)=-2∑h=1nlog⁡{1+(eα+βth-1)1n∑j=1n1λeα+βyj1-λ+λeα+βyj}+2∑j=1n1log⁡(1-λ+λeα+βyj).
It can be verified that H(α,β) is almost surely concave in a neighborhood of (0,0) given λ, which means that maximizing H(α,β) with respect to (α,β) gives the maximum of pR(λ,α,β) for fixed λ. The stability of the method is illustrated by the following simulation study.


## 5. Simulation Study

We consider two models in Examples1.3 and 1.4 with μ1=0, μ2=μ, and σ2=1 for Example 1.3, and m1=1, m2=m, and θ=1 for Example 1.4. Nominal levels of 0.01, 0.05, and 0.10 are considered. The logarithm transformation is applied to the original data before using the EM test. The initial set Λ={0.1,0.2,…,1} and iteration number K=3 are used to calculate the EM test statistic.One competitive method for testing homogeneity under the semiparametric two-sample model is the score test proposed by Qin and Liang  [1]. This method is based on(5.1)S(α,β)=∂l(λ,α,β)∂λ|λ=0=∑j=1n1(eα+βyj-1),
where l(λ,α,β) is the log empirical likelihood function given in (2.4). Let (α̂1,β̂1)=argmaxα,βl(1,α,β). The score test statistic was defined as T1=S(α̂1,β̂1)/(1+n1/n0), which has a χ12 limiting distribution under the null hypothesis.We compare the EM test and the score test in terms of type I error and power. We calculate the type I errors of each method under the null hypothesis based on 20,000 repetitions and the power under the alternative models based on 2,000 repetitions. For fair comparison, simulated critical values are used to calculate the power. We consider two sample sizes: 50 and 200 andK=1,2,3. Tables 1 and 2 contain the simulation results for the log-normal models and Tables 3 and 4 for the gamma models.Table 1
Type I error and power comparisons (%) of the EM test and the score test (SC test) for log-normal model: n0=n1=50.
λμLevelEMn(1)EMn(2)EMn(3)SC test01011.912.212.211.5056.36.56.56.4011.61.61.61.90.111014.814.514.514.60.1158.58.68.68.60.1112.52.52.52.40.121027.228.12825.60.12517.818.418.416.70.1216.66.76.76.20.131047.148.348.341.40.13534.235.635.430.80.13115.415.615.614.90.211025.525.92625.60.21516.416.416.4170.2115.45.35.35.70.221062.262.762.756.70.22550.651.351.245.90.22128.428.528.524.70.231088.388.888.8810.2358182.382.373.40.23161.761.961.951.50.311043.342.942.842.80.31531.331.131.131.60.31114.214.214.213.90.321088.188.588.584.20.32580.880.880.876.80.32161.561.561.555.30.331099.399.399.3970.3359898.298.294.80.3319393.293.285.2Table 2
Type I error and power comparisons (%) of the EM test and the score test (SC test) for log-normal model:n0=n1=200.
λμLevelEMn(1)EMn(2)EMn(3)SC test01010.410.510.610.2055.55.65.65.4011.21.21.21.20.111026.526.726.526.20.11517.217.217.216.40.1115.85.965.60.121068.36969.258.40.12558.558.858.947.40.1213737.137.425.10.131096.496.89784.40.13594.694.895.277.60.13186.287.287.458.60.21106362.962.862.10.21550.2505049.40.21127.827.627.526.20.221099.299.399.497.50.22598.698.698.6950.22195.195.295.285.50.23101001001001000.23510010010099.90.23110010010099.20.311089.589.589.6890.3158483.983.982.60.31165.164.964.6630.32101001001001000.32510010010099.90.32110010010099.70.33101001001001000.3351001001001000.331100100100100Table 3
Type I error and power comparisons (%) of the EM test and the score test (SC test) for gamma model:n0=n1=50.
λmLevelEMn(1)EMn(2)EMn(3)SC test01012.212.512.512.1056.46.66.66.7011.41.41.42.30.121014.915.115.2120.1258.88.98.96.40.1212.82.82.80.60.131019.619.919.914.10.13513.213.213.27.70.1314.34.44.410.141025.526.426.5170.14517.517.917.99.20.1416.36.46.41.10.221022.922.722.817.60.22514.414.314.39.20.2214.54.74.71.20.231039.639.94027.40.23529.129.529.516.70.23114.314.414.440.241061.161.761.7370.24549.249.649.624.10.24128.428.628.66.60.321036.336.436.428.60.32526.125.925.916.90.32111.911.911.93.10.331067.267.267.248.90.33555.855.855.835.10.331343434.111.30.341087.988.188.267.50.34581.882.282.253.40.34163.163.363.421.4Table 4
Type I error and power comparisons (%) of the EM test and the score test (SC test) for gamma model:n0=n1=200.
λmLevelEMn(1)EMn(2)EMn(3)SC test01011.211.311.311.1055.95.965.7011.21.21.21.40.121023.122.722.719.70.12514.214.214.211.70.1215.15.15.23.10.131039.639.839.929.50.1352929.429.6190.13113.213.413.54.80.141062.362.562.737.50.14552.252.552.826.20.14132.533.233.78.50.22104948.948.943.80.22536.636.736.530.60.22119.419.419.411.40.231088.288.288.4730.23581.581.681.661.20.23164.664.664.834.60.241098.998.998.987.10.2459898.198.179.70.24194.394.294.254.50.321078.578.578.6730.32570.1707062.50.32148.748.848.834.90.331099.299.299.296.10.33598.898.898.8930.33196.596.596.578.80.341010010010099.40.34510010010098.70.34110010010092.5The results show that the EM test and the score test have similar type I errors. For both methods, the type I errors are somehow larger than the nominal levels when the sample size isn=50; they are close to the nominal levels when the sample size is increased to n=200. For the log-normal models, two methods have almost the same power when the alternatives are close to each other such as μ=1; the EM test becomes much more powerful when the alternatives are distant and the sample size increases. In the case of n=50, λ=0.2, μ=3, and nominal level 0.01, the EM test has a 10% gain in power compared with the score test; the gain rushes up to almost 30% when λ=0.1, μ=3, and the sample size increases to n=200. For the gamma models, the advantage of the EM test is more obvious. For both sample sizes n=50 and 200, the EM test is more powerful than the score test.


## 6. Real Example

We apply our EM test procedure to the drug abuse data [15] in a study of addiction to morphine in rats. In this study, rats got morphine by pressing a lever and the frequency of lever presses (self-injection rates) after six-day treatment with morphine was recorded as response variable. The data consist of the number of lever presses for five groups of rats: four treatment groups with different dose levels and one saline group (control group).We analyzed the response variables (the number of lever presses by rats) of the treatment group at the first dose level and the control group. The data is tabulated in Table  3 of  Fu et al. [5]. Following Boos and Browine [16] and Fu et al. [5],  we analyze the transformed data, log10(R+1) with R being the number of lever presses by rats. Instead of using the parametric models as Boos and Browine [16]  and Fu et al. [5], we adopt Anderson’s semiparametric approach. That is, we assume that the response variables in control group comes from f(x), while the response variables in treatment group comes from h(x)=(1-λ)f(x)+λg(x) with g(x)/f(x)=exp(α+βx). The EM test statistics for testing homogeneity under the semiparametric two-sample model are found to be EMn(1)=14.090, EMn(2)=14.150, and EMn(3)=14.167. Calibrated by the χ12 limiting distribution, the Pvalues are all around 0.02%. We also applied the score test of  Qin and Liang [1]. The score test statistic is 9.417 with the P value equal to 0.2% calibrated by the χ12 limiting distribution. We also used the permutation methods to get the Pvalues of the two types of tests. Based on 50,000 permutations, the P values of the three EM test statistics are all around 0.03%, and the P value of the score test is around 0.5%. In accordance with Fu et al. [5], both methods suggest a significant treatment effect, while the proposed EM test has much stronger evidence than the score test.



---

*Source: 537474-2012-04-01.xml*