# Conditional and Unconditional Tests (and Sample Size) Based on Multiple Comparisons for Stratified 2 × 2 Tables

Authors: A. Martín Andrés; I. Herranz Tejedor; M. Álvarez Hernández
Journal: Computational and Mathematical Methods in Medicine
 (2015)

---

## Abstract

The Mantel-Haenszel test is the most frequent asymptotic test used for analyzing stratified 2× 2 tables. Its exact alternative is the test of Birch, which has recently been reconsidered by Jung. Both tests have a conditional origin: Pearson’s chi-squared test and Fisher’s exact test, respectively.  But both tests have the same drawback that the result of global test (the stratified test) may not be compatible with the result of individual tests (the test for each stratum). In this paper, we propose to carry out the global test using a multiple comparisons method (MC method) which does not have this disadvantage. By refining the method (MCB method) an alternative to the Mantel-Haenszel and Birch tests may be obtained. The new MC and MCB methods have the advantage that they may be applied from an unconditional view, a methodology which until now has not been applied to this problem. We also propose some sample size calculation methods.


---

## Body

## 1. Introduction

In statistics it is very usual to have to verify whether association exists between two dichotomic qualities. This is especially frequent in medicine, for example, where the aim is to assess whether the presence or absence of a risk factor conditions the presence or absence of a disease or compare two treatments whose answers are success or failure, and so forth. In all the cases the problem produces data whose frequencies are presented in a2×2 table: the two levels of one of the qualities are set out in the rows, the two levels of the other quality in the columns, and the observed frequencies are set out inside the table.The exact and the asymptotic analyses of a2×2 table have their roots in the origins of statistics, and hundred of papers have been devoted to the problem [1]. It is traditional to carry out the exact independence test using the Fisher exact test, which is a conditional test (because it assumes that the marginals of the rows and columns are previously fixed). More than thirty years has passed since the situation changed, and it is well known that the unconditional exact test tends to be less conservative and more powerful than the conditional test [2–4], because the loss of information as a result of conditioning may be as high as 26% [5]. The unconditional tests assume that it is only the values that were really previously fixed: the marginal of the rows, the marginal of the columns or the total data in the table. This causes two types of unconditional test: that of the double binominal model (the first two cases) and that of the multinomial model (the third case). The same can be said of the asymptotic tests, generally based on Pearson’s chi-squared statistic with different corrections for continuity (cc). However, the unconditional exact tests have the great disadvantage of being very laborious to compute. An overall view of the problem can be seen in Martín Andrés [1, 6].Frequently the individuals who take part in the study are stratified in groups based on a covariate such as sex or age, which gives rise to several2×2 tables. In this case the aim is to contrast the independence of both the original dichotomic qualities, bearing in mind the heterogeneity of the populations defined by the strata. To this end, the most frequent approach is to suggest a test under the null hypothesis of Mantel-Haenszel for which the odds ratio (or the risk ratio) for all the strata is equal to unity. For this purpose the most frequent asymptotic tests are those of Cochran [7] and Mantel and Haenszel [8], both of which are very similar; the exact version of the test is due to Birch [9] (and has recently been reconsidered by [10]). In all these cases the proposed tests are conditional and, when there is only one stratum, the test for the case of only one 2×2 table is obtained (Fisher’s exact test or Pearson’s chi-squared test). Moreover, Jung [10] and Jung et al. [11] propose a sample size calculation method, asymptotic in the first and exact in the second.The procedures indicated have the drawback of almost all the tests for a global null hypothesis like the one in question that the result of the global (stratified) test may not be compatible with that of the individual tests (the test for each stratum). In this paper, we propose a global test (MC test) which does not have this disadvantage because it is based on a multiple comparisons method: the global test is significant if and only if at least one of the individual tests is significant. In return the MC test will have the drawback of being less powerful, given that it must control both the alpha error of the global test and the alpha errors in the individual tests. Because of this, another procedure is proposed (MCB test) which only controls the alpha error of the global test (just as in the classic stratified tests), although the alpha error in the individual tests will only exceed the nominal value on a few occasions (and generally by very little). The two procedures are applicable from both the conditional and the unconditional point of view and also when carrying out an asymptotic test or an exact test. The advantage of applying them in the form of an unconditional test is that in this way the loss of power mentioned above is reduced with regard to the classic global tests. In addition this paper shows that the asymptotic tests function well, even for small samples, if they are carried out with the appropriate continuity correction. And finally, the sample size for almost all the cases studied (exact or asymptotic tests, conditional or unconditional tests) is determined.


## 2. Hypothesis Test

### 2.1. Notation, Models, and Example

In the following (without loss of generality) it will be assumed that each2×2 table refers to the successes or failures in two treatments which are applied to mj and nj individuals, respectively. Let J be the number of strata, Nj=mj+nj (j=1,…,J) the total of individuals in the stratum j, N=∑jNj the total sample size, {xj,x-j=mj-xj} and {yj,y-j=nj-yj} the number of successes and the number of failures with the treatments 1 and 2, respectively, and zj=xj+yj and z-j=x-j+y-j the total number of successes and failures in the stratum j respectively. These data may be summarized as shown in Table 1. Once the experiment has been performed, the values obtained will be written with an extra subindex “0,” that is, xj0,yj0,mj0,Nj0,….Table 1
Frequency data of 2 × 2 table for stratumj.
Treatment
Response
Total
Yes
No
1
x
j
x
-
j
m
j
2
y
j
y
-
j
n
j
Total
z
j
z
-
j
N
jLetpj and qj (p-j=1-pj and q-j=1-qj) be the probabilities of success (failure) with treatments 1 and 2 in the stratum j, respectively. The odds ratio for each stratum is θj=pjq-j/p-jqj, and the aim is to contrast the null hypothesis H: θ1=⋯=θJ=1 against an alternative hypothesis with one tail (K: θj>1 for some j) or with two tails (K: θj≠1 for somej). This paper addresses only the case of one-sided test; for the two-tail test the procedure is similar.In the previous description it was assumed that the data (xj,yj) of each stratumj proceed from a double binomial distribution of sizes mj and nj and probabilities pj and qj in groups 1 and 2, respectively. Because in each stratum j there are two previously fixed values (mj and nj) the model will be referred to as Model 2; the model is very frequently used in practice so that it will serve here as a basis for defining and illustrating the procedures MC and MCB. If in each stratum there is conditioning in the observed value zj=xj+yj, then one has Model 3; now the three values mj, zj, and Nj are previously fixed in each stratum j and the only variable xj arises from a hypergeometric distribution. If only the values of Nj are fixed in each stratum j, one will get Model 1: xj,yj,x-j proceeding from a multinomial distribution. Finally, if only the global sample size N is fixed (so that now even the values for Nj are obtained at random), one will have Model 0. With conditioning in the appropriate marginal, the model X leads to the model (X+1). Therefore, whatever the initial model (i.e., whatever the sampling method for the data obtained), by conditioning in all the nonfixed marginals one always obtains Model 3 (which is the one covered by Birch and Mantel and Haenszel).Each model produces a different sample space, which is formed by the set of all possible values ​​of the set of variables involved in the same. For example, the sample space of stratumj under Model 2 consists of (mj+1)×(nj+1) possible values of (xj,yj). Each transition from a Model X to Model (X+1) constitutes a loss of information, because the number of points of the new sample space is very much smaller than that of the previous one. Probably the most dramatic transition is that of Models 2 to 3, a transition in which the loss of information may reach 26% for J=1 [5]. In addition, each transition implies using a conditional rather than an unconditional method of eliminating nuisance parameters, something which is generally never advisable [13].The data in Table2, which are given by Li et al. [12], are taken from preliminary analysis of an experiment of three groups to evaluate whether thymosin (treatment 1), compared to a placebo (treatment 2), has any effect on the treatment of bronchogenic carcinoma patients receiving radiotherapy. The one-sided p values are PBirch=0.1563 by global conditional stratified exact test and P1=0.80073, P2=0.57143, and P3=0.14706 by Fisher’s individual conditional exact test in each stratum. If the global test is carried out to an error α-=0.1563 we conclude K, so that now θj>1 at least once. However no individual test has significance if these are carried out to an alpha error that respects the former global error; for example, by using Bonferroni’s method, the smaller of the three p values P3=0.14706>0.1563/3. The same thing occurs if asymptotic tests are used. Our aim is to define procedures in which these incompatibilities will not occur.Table 2
Response to thymosin in cancer patients (yes = success, no = failure).
Stratum 1
Total
Stratum 2
Total
Stratum 3
Total
Yes
No
Yes
No
Yes
No
Thymosin
10
1
11
9
0
9
8
0
8
Placebo
12
1
13
11
1
12
7
3
10
Total
22
2
24
20
1
21
15
3
18


### 2.2. Conditional Tests Obtained by Using Classic Methods (Model 3)

Thep value of exact test is PBirch=0.1563. Table 3 shows this value and the remaining p values in this paper. This result is based on determining the probability of all the configurations (xj∣Nj,mj,zj), j=1,2,…,J, such as S=∑jxj≥S0=∑jxj0=27. Here S is a test statistic determining the order in which the points of the sample space (x1,x2,x3) enter the region R, a region whose probability under H yields the value of PBirch. Note that as the sample spaces in each stratum are 9≤x1≤11, 8≤x2≤9, and 5≤x3≤8, the possible values of (x1,x2,x3) will be 3×2×4=24, which is the total number of points in the global sample space; of these, four belong to R (three with S=27 and one with S=28), so that 4/24=0.1667. Moreover note that, under the original Model 2, the number of points in the sample space of strata 1, 2, and 3 are (mj+1)×(nj+1)=(11+1)×(13+1), (9+1)×(12+1), and (8+1)×(10+1), respectively. The total points for the global sample space will be 168×130×99: more than two million, compared to only 24 in Model 3. To determine the value PBirch have developed various programs (see references in [14]); an easy way to get it is through http://www.openepi.com/Menu/OE_Menu.htm (option “Two by Two Table”).Table 3
p values obtained by various methods for the data in the example of Li et al. [12]. Each asymptotic method is placed directly below the exact method from which it proceeds.
Model
Test
Procedure
Statistic used
p value
3
Exact
Birch
Sum of successes (treated group)
0.1563
Asymptotic
MH
χ
MH of Mantel-Haenszel (without cc)
0.0760
χ
MH of Mantel-Haenszel (with cc)
0.1573
Exact
MC
p value Fisher
0.3795
Asymptotic
χ
3 of Yates
0.3887
Exact
MCB
p value Fisher
0.1471
Asymptotic
χ
3 of Yates
0.1513
2
Exact
MC
p value Barnard
0.1602
Asymptotic
χ
2 of  Martín et al.
0.1614
Exact
MCB
p value Barnard
0.1533
Asymptotic
χ
2 of Martín et al.
0.1588
1
Exact
MC
p value Barnard
0.1282
Asymptotic
χ
1 of Pirie and Hamdan
0.1512
Note: MH = Mantel-Haenszel test; MC = multiple comparisons method; MCB = method based on the multiple comparisons.The asymptotic test of Mantel-Haenszel based on∑xj is asymptotically normal with mean ∑Ej=∑jmjzj/Nj and variance ∑Vj=∑mjnjzjz-j/Nj2(Nj-1). Therefore the contrast statistic is χMH=(∑xj-∑Ej)/(∑Vj)0.5, whose p value PMH=0.0760 patently does not agree with PJung=0.1563. However because the variable S is discrete, it is convenient to carry out a continuity correction [15]. AsS jumps one space at a time, the cc should be 0.5 and so the statistic with cc will be χMHc=(∑xj-∑Ej-0.5)/∑Vj0.5 [8]. The new p value PMHc=0.1573 itself is already compatible with the exact value.


### 2.3. MC and MCB Tests Based on the Criterion of the Multiple Comparisons: General Observations

Let us suppose that in each stratum the hypothesesHj: θj=1 versus Kj: θj>1 to error αj are contrasted. Thereby H=∩Hj and K=∪Kj. If the global null hypothesis H is rejected when there exists at least one j in which the individual test rejected Hj, then the alpha error α- of the global test (H versus K) will be [16](1)α-=1-∏1-αj.In particular, if αj=α(∀j) method MC is obtained (the “method of the multiple comparisons”), and its global alpha error will be (2)α-=1-1-αJ.Method MC guarantees the compatibility of the results of the global test and of the individual tests, because the global test is significant if and only if at least one of the individual tests is so. When J=1, the global test is the same as the individual test.On the basis of the above, in general the test can be defined as follows. In each stratumj an order statistic Sj will have been defined which allows the p value for each one of its points to be determined. If the points from all strata are mixed, they are ordered from the lowest value of their p value to the highest and will be introduced one by one into the global critical region R until a given condition (stopping rule) has been verified; then R=∪Rj, with Rj the critical region formed by the points in the stratum j which belong to R. Let αj be the largest of the p values of the points in Rj. The real global alpha error α-MC of the test constructed thus will be given by expression (1).When the stopping rule is “stop introducing points intoR when the maximum of the αj is as close as possible to α (but less than or equal to α),” with α given by(3)α=1-1-α-J,then method MC is obtained, and this method simultaneously controls global error α- and the individual error α. Now, the critical region Rj=RjMC of each stratum consists of all the points whose p value is smaller or equal to α, αj=αjMC≤α, R=RMC=∪RjMC and the real global error will be α-MC=1-∏(1-αjMC)≤1-1-αJ=α-.It is a simpler process to obtain thep value PMC of some observed data. Let Pj be the p-value of the individual test in stratum j. The first individual alpha error for which K is concluded will be α=P0=min⁡jPj, so that for expression (2) the p value of the global text will be(4)PMC=1-1-P0J.When the stopping rule is “stop introducing points intoR when 1-∏(1-αj) is the closest possible to α- (but smaller than or equal to α-),” method MCB is obtained (the method “based on the multiple comparisons”). Because now only the global error α- is controlled, its goal is similar to that of Jung’s method [10]. The method MCB causes that Rj=RjMCB, αj=αjMCB, R=RMCB=∪RjMCB and the real global error is α-MCB=1-∏(1-αjMCB)≤α-. Note that RMC⊆RMCB, since α-MC≤α-, something to be expected given that method MC controls two errors and the MCB method controls only one of these.Let us see how we can obtain thep value PMCB of some observed data in which P0=P1 for example. The region RMCB which yields the first significance of the global test is obtained when the observed point in stratum 1 is the last introduced into RMCB, that is, when α1MCB=P0; in the other strata it should be αjMCB≤P0, but as close as possible to P0. Thus the p value will be PMCB=1-∏1-αjMCB. It can now be seen that αjMCB=αjMC where αjMC are the values of the MC test when this is carried out to the error α=P0. Therefore PMCB≤PMC and, for effects of calculating the p value PMCB, the p values αjMCB=αjMC and the regions RjMC=RjMCB will be written just as αj∗ and Rj∗, respectively. Thus, if αj∗ is the largest p value in stratum j which is smaller than or equal to P0,(5)PMCB=1-∏1-αj∗.Methods MC and MCB may be applied with exact methods or with asymptotic methods and to any of the three models, as illustrated in the following sections.


### 2.4. MC and MCB Tests under Model 3

Thep values of the Fisher exact test in each stratum are P1=0.80073, P2=0.57143, and P3=0.14706. So, P0=P3=0.14706 and PMC=0.3795 by expression (4). In order to apply method MCB the critical regions Rj∗ (j=1 and 2) must be determined to the objective error α=0.14706=P0=α3∗. For j=1, 9≤x1≤11 with Pr⁡{x1=11∣H1}=0.2862>P0; thus R1∗=ϕ and α1∗=0. This same occurs for j=2 (α2∗=0). For expression (5), PMCB=0.1471 (smaller than PJung). Generally speaking the critical region of Birch [9] and Jung [10] has the form S=∑jxj≥S0=∑jxj0, while that of method MCB is in the form ∪{xj≥xj∗}, with xj∗≥xj0. It can be proved that this generally implies that the Birch method will yield ap value smaller than or equal to that of method MCB when thep values Pi are similar or when the observed values xj0 are the highest possible.Let us now apply an asymptotic test. In general, whatever the model is, the appropriate statistic is the chi-squared statistic [6]:(6)χj=xjy-j-yjx-j-cjmjnjzjz-j/Nj-1.The appropriate value for the continuity correction cj depends on the assumed model, and that value is what causes the results of the three models to be different. When cj=0(∀j) Pearson’s classic chi-squared statistic is obtained. In the case here of Model 3, by making cj=Nj/2 the classic statistic χ3j (or the Yates chi-squared statistic) is obtained. Its maximum value is reached in stratum 3 (χ33=1.0308), which yields thep values P0=0.15132 and PMC=0.3887. In order to apply method MCB, one must obtain in the other two strata the first value χ3j∗ of χ3j which is larger than or equal to χ33. As there is none, α1∗=α2∗=0, α3∗ = 0.15132 and PMCB=0.1513. Note that the asymptoticp values are similar to the exact ones, both with method MC and with method MCB. Despite the small size of the samples, the asymptotic methods function well (something which also occurs with the rest of the methods, as will be seen).


### 2.5. MC and MCB Tests under Model 2

The data in the example in reality proceeds from Model 2. In determining thep value Pj of an observed table of Model 2 (xj0,yj0∣mj,nj) the same steps are followed as in Model 3 (except the last, which is special): (1) define an order statistic Sj(xj,yj∣mj,nj), which does not need to be the same one in each stratum; (2) determine the set of points Rj={(xj,yj∣mj,nj)∣Sj(xj,yj∣mj,nj)≥Sj0(xj0,yj0∣mj,nj)}; (3) calculate the probability of Rj under Hj: pj=qj=πj given by αjπj=∑RjCmj,xjCnj,yjπjzj1-πjz-j; and (4) determine thep value as Pj=max⁡πj⁡αj(πj), where πj is the nuisance parameter that is eliminated by maximization (the most complicated step). Note that πj is the marginal probability of columns under Hj. In the case of Model 3 there is only one order statistic Sj possible [17], because the convexity of the region Rj must be verified and the points ordered “from the largest to the smallest value of xj.” In the case of Model 2 there are many possible test statistics. One of these is the order Fj of Boschloo [18]: order the points from the smaller to larger value of its one-tailedp value obtained using the Fisher exact test. It is already known [19] that the unconditional test based on the order Fj is uniformly more powerful (UMP) than Fisher’s own exact test. Although no unconditional order is UMP compared to the rest, the generally most powerful order is [3] the complex statistic Bj of Barnard [20].As far as we know, the only program that carries out the above calculations for the statisticBj is SMP.EXE, which may be obtained free of charge at http://www.ugr.es/local/bioest/software.htm. The program also gives the solution for other simpler test statistics. Using this program, because the minimump value is P3=0.05653 then PMC=0.1602. In order to obtain PMCB one has to proceed as in the previous section, although now the process is now somewhat more difficult. In stratum 1, the table (x1,y1)=(11,10) is the one that gives a largerp value α1∗=0.05462, but smaller than or equal to α3∗=0.05653. In stratum 2 the results are (x2,y2)=(4,1) and α2∗=0.05069. So, PMCB=0.1533, a value which is similar to that of PBirch (the results are alike if other order statistics of the program SMP.EXE are used). It can be seen that the use of the unconditional method allows the inherent conservatism in the definitions of methods MC and MCB to be reduced.In order to carry out the asymptotic test we shall use the optimal version of expression (6) for Model 2: χ2j is the value of expression (6) when cj=1 (or 2) if mj≠nj (or mj=nj) [6]. Now the maximum value is χ23=1.5805, whereby P3=0.05700 and PMC=0.1614 (a value, i.e., very near the 0.1602 of the exact method). Proceeding as above, the first values χ2j∗ of χ2j (j=1 or 2) which are larger than or equal to χ23 are χ21∗=1.5822 for (x1,y1)=(10,8) and χ22∗=1.6056 for (x2,y2)=(2,0). This makes α1∗=0.05680, α2∗=0.05418, and PMCB=0.1588 (which is also a value, i.e., very close to the 0.1533 of the exact method).


### 2.6. MC and MCB Tests under Models 1 and 0

Let us suppose now that the data contained in the example in Table2 proceed from Model 1. The determining of thep value Pj of an observed table (xj0,yj0,y-j0∣nj) is the same as in Model 2, but now the calculations are more complicated because the nuisance parameters must be eliminated (the marginal probabilities of rows and columns under Hj). Again there are many possible test statistics [1, 21], although none of them is UMP compared to the others. The generally more powerful statistic is again Barnard’s Bj statistic [22] and, as far as we know, the only program to apply it is TMP.EXE which may be obtained free of charge at http://www.ugr.es/local/bioest/software.htm. The program also gives the solution using other simpler test statistics. Using this program, the minimump value is P3=0.04472 and from this PMC=0.1282 (substantially smaller than PBirch).In order to carry out the asymptotic test we shall use the optimal version of expression (6) for Model 1: χ1j is the value of expression (6) when cj=0.5∀j [6]. The statistic is given by Pirie and Hamdan [23]. Now the maximum value is χ13=1.6149, with the result that P3=0.05317 and PMC=0.1512.Method MCB (which is very laborious to calculate) is omitted here, because the large number of points in the sample space will makeα1∗≈α2∗≈α3∗=P3 and so PMC≈PMCB. Note that stratum 1 under Model 2 consists of (m1+1)(n1+1)=(11+1)×(13+1)=168 points, but under Model 1 it consists of (N1+1)(N1+2)(N1+3)/6=25×26×27/6= 2,925 points. For similar reasons, Model 0 can be treated as if it were Model 1 (by conditioning in the real obtained values Nj).


## 2.1. Notation, Models, and Example

In the following (without loss of generality) it will be assumed that each2×2 table refers to the successes or failures in two treatments which are applied to mj and nj individuals, respectively. Let J be the number of strata, Nj=mj+nj (j=1,…,J) the total of individuals in the stratum j, N=∑jNj the total sample size, {xj,x-j=mj-xj} and {yj,y-j=nj-yj} the number of successes and the number of failures with the treatments 1 and 2, respectively, and zj=xj+yj and z-j=x-j+y-j the total number of successes and failures in the stratum j respectively. These data may be summarized as shown in Table 1. Once the experiment has been performed, the values obtained will be written with an extra subindex “0,” that is, xj0,yj0,mj0,Nj0,….Table 1
Frequency data of 2 × 2 table for stratumj.
Treatment
Response
Total
Yes
No
1
x
j
x
-
j
m
j
2
y
j
y
-
j
n
j
Total
z
j
z
-
j
N
jLetpj and qj (p-j=1-pj and q-j=1-qj) be the probabilities of success (failure) with treatments 1 and 2 in the stratum j, respectively. The odds ratio for each stratum is θj=pjq-j/p-jqj, and the aim is to contrast the null hypothesis H: θ1=⋯=θJ=1 against an alternative hypothesis with one tail (K: θj>1 for some j) or with two tails (K: θj≠1 for somej). This paper addresses only the case of one-sided test; for the two-tail test the procedure is similar.In the previous description it was assumed that the data (xj,yj) of each stratumj proceed from a double binomial distribution of sizes mj and nj and probabilities pj and qj in groups 1 and 2, respectively. Because in each stratum j there are two previously fixed values (mj and nj) the model will be referred to as Model 2; the model is very frequently used in practice so that it will serve here as a basis for defining and illustrating the procedures MC and MCB. If in each stratum there is conditioning in the observed value zj=xj+yj, then one has Model 3; now the three values mj, zj, and Nj are previously fixed in each stratum j and the only variable xj arises from a hypergeometric distribution. If only the values of Nj are fixed in each stratum j, one will get Model 1: xj,yj,x-j proceeding from a multinomial distribution. Finally, if only the global sample size N is fixed (so that now even the values for Nj are obtained at random), one will have Model 0. With conditioning in the appropriate marginal, the model X leads to the model (X+1). Therefore, whatever the initial model (i.e., whatever the sampling method for the data obtained), by conditioning in all the nonfixed marginals one always obtains Model 3 (which is the one covered by Birch and Mantel and Haenszel).Each model produces a different sample space, which is formed by the set of all possible values ​​of the set of variables involved in the same. For example, the sample space of stratumj under Model 2 consists of (mj+1)×(nj+1) possible values of (xj,yj). Each transition from a Model X to Model (X+1) constitutes a loss of information, because the number of points of the new sample space is very much smaller than that of the previous one. Probably the most dramatic transition is that of Models 2 to 3, a transition in which the loss of information may reach 26% for J=1 [5]. In addition, each transition implies using a conditional rather than an unconditional method of eliminating nuisance parameters, something which is generally never advisable [13].The data in Table2, which are given by Li et al. [12], are taken from preliminary analysis of an experiment of three groups to evaluate whether thymosin (treatment 1), compared to a placebo (treatment 2), has any effect on the treatment of bronchogenic carcinoma patients receiving radiotherapy. The one-sided p values are PBirch=0.1563 by global conditional stratified exact test and P1=0.80073, P2=0.57143, and P3=0.14706 by Fisher’s individual conditional exact test in each stratum. If the global test is carried out to an error α-=0.1563 we conclude K, so that now θj>1 at least once. However no individual test has significance if these are carried out to an alpha error that respects the former global error; for example, by using Bonferroni’s method, the smaller of the three p values P3=0.14706>0.1563/3. The same thing occurs if asymptotic tests are used. Our aim is to define procedures in which these incompatibilities will not occur.Table 2
Response to thymosin in cancer patients (yes = success, no = failure).
Stratum 1
Total
Stratum 2
Total
Stratum 3
Total
Yes
No
Yes
No
Yes
No
Thymosin
10
1
11
9
0
9
8
0
8
Placebo
12
1
13
11
1
12
7
3
10
Total
22
2
24
20
1
21
15
3
18


## 2.2. Conditional Tests Obtained by Using Classic Methods (Model 3)

Thep value of exact test is PBirch=0.1563. Table 3 shows this value and the remaining p values in this paper. This result is based on determining the probability of all the configurations (xj∣Nj,mj,zj), j=1,2,…,J, such as S=∑jxj≥S0=∑jxj0=27. Here S is a test statistic determining the order in which the points of the sample space (x1,x2,x3) enter the region R, a region whose probability under H yields the value of PBirch. Note that as the sample spaces in each stratum are 9≤x1≤11, 8≤x2≤9, and 5≤x3≤8, the possible values of (x1,x2,x3) will be 3×2×4=24, which is the total number of points in the global sample space; of these, four belong to R (three with S=27 and one with S=28), so that 4/24=0.1667. Moreover note that, under the original Model 2, the number of points in the sample space of strata 1, 2, and 3 are (mj+1)×(nj+1)=(11+1)×(13+1), (9+1)×(12+1), and (8+1)×(10+1), respectively. The total points for the global sample space will be 168×130×99: more than two million, compared to only 24 in Model 3. To determine the value PBirch have developed various programs (see references in [14]); an easy way to get it is through http://www.openepi.com/Menu/OE_Menu.htm (option “Two by Two Table”).Table 3
p values obtained by various methods for the data in the example of Li et al. [12]. Each asymptotic method is placed directly below the exact method from which it proceeds.
Model
Test
Procedure
Statistic used
p value
3
Exact
Birch
Sum of successes (treated group)
0.1563
Asymptotic
MH
χ
MH of Mantel-Haenszel (without cc)
0.0760
χ
MH of Mantel-Haenszel (with cc)
0.1573
Exact
MC
p value Fisher
0.3795
Asymptotic
χ
3 of Yates
0.3887
Exact
MCB
p value Fisher
0.1471
Asymptotic
χ
3 of Yates
0.1513
2
Exact
MC
p value Barnard
0.1602
Asymptotic
χ
2 of  Martín et al.
0.1614
Exact
MCB
p value Barnard
0.1533
Asymptotic
χ
2 of Martín et al.
0.1588
1
Exact
MC
p value Barnard
0.1282
Asymptotic
χ
1 of Pirie and Hamdan
0.1512
Note: MH = Mantel-Haenszel test; MC = multiple comparisons method; MCB = method based on the multiple comparisons.The asymptotic test of Mantel-Haenszel based on∑xj is asymptotically normal with mean ∑Ej=∑jmjzj/Nj and variance ∑Vj=∑mjnjzjz-j/Nj2(Nj-1). Therefore the contrast statistic is χMH=(∑xj-∑Ej)/(∑Vj)0.5, whose p value PMH=0.0760 patently does not agree with PJung=0.1563. However because the variable S is discrete, it is convenient to carry out a continuity correction [15]. AsS jumps one space at a time, the cc should be 0.5 and so the statistic with cc will be χMHc=(∑xj-∑Ej-0.5)/∑Vj0.5 [8]. The new p value PMHc=0.1573 itself is already compatible with the exact value.


## 2.3. MC and MCB Tests Based on the Criterion of the Multiple Comparisons: General Observations

Let us suppose that in each stratum the hypothesesHj: θj=1 versus Kj: θj>1 to error αj are contrasted. Thereby H=∩Hj and K=∪Kj. If the global null hypothesis H is rejected when there exists at least one j in which the individual test rejected Hj, then the alpha error α- of the global test (H versus K) will be [16](1)α-=1-∏1-αj.In particular, if αj=α(∀j) method MC is obtained (the “method of the multiple comparisons”), and its global alpha error will be (2)α-=1-1-αJ.Method MC guarantees the compatibility of the results of the global test and of the individual tests, because the global test is significant if and only if at least one of the individual tests is so. When J=1, the global test is the same as the individual test.On the basis of the above, in general the test can be defined as follows. In each stratumj an order statistic Sj will have been defined which allows the p value for each one of its points to be determined. If the points from all strata are mixed, they are ordered from the lowest value of their p value to the highest and will be introduced one by one into the global critical region R until a given condition (stopping rule) has been verified; then R=∪Rj, with Rj the critical region formed by the points in the stratum j which belong to R. Let αj be the largest of the p values of the points in Rj. The real global alpha error α-MC of the test constructed thus will be given by expression (1).When the stopping rule is “stop introducing points intoR when the maximum of the αj is as close as possible to α (but less than or equal to α),” with α given by(3)α=1-1-α-J,then method MC is obtained, and this method simultaneously controls global error α- and the individual error α. Now, the critical region Rj=RjMC of each stratum consists of all the points whose p value is smaller or equal to α, αj=αjMC≤α, R=RMC=∪RjMC and the real global error will be α-MC=1-∏(1-αjMC)≤1-1-αJ=α-.It is a simpler process to obtain thep value PMC of some observed data. Let Pj be the p-value of the individual test in stratum j. The first individual alpha error for which K is concluded will be α=P0=min⁡jPj, so that for expression (2) the p value of the global text will be(4)PMC=1-1-P0J.When the stopping rule is “stop introducing points intoR when 1-∏(1-αj) is the closest possible to α- (but smaller than or equal to α-),” method MCB is obtained (the method “based on the multiple comparisons”). Because now only the global error α- is controlled, its goal is similar to that of Jung’s method [10]. The method MCB causes that Rj=RjMCB, αj=αjMCB, R=RMCB=∪RjMCB and the real global error is α-MCB=1-∏(1-αjMCB)≤α-. Note that RMC⊆RMCB, since α-MC≤α-, something to be expected given that method MC controls two errors and the MCB method controls only one of these.Let us see how we can obtain thep value PMCB of some observed data in which P0=P1 for example. The region RMCB which yields the first significance of the global test is obtained when the observed point in stratum 1 is the last introduced into RMCB, that is, when α1MCB=P0; in the other strata it should be αjMCB≤P0, but as close as possible to P0. Thus the p value will be PMCB=1-∏1-αjMCB. It can now be seen that αjMCB=αjMC where αjMC are the values of the MC test when this is carried out to the error α=P0. Therefore PMCB≤PMC and, for effects of calculating the p value PMCB, the p values αjMCB=αjMC and the regions RjMC=RjMCB will be written just as αj∗ and Rj∗, respectively. Thus, if αj∗ is the largest p value in stratum j which is smaller than or equal to P0,(5)PMCB=1-∏1-αj∗.Methods MC and MCB may be applied with exact methods or with asymptotic methods and to any of the three models, as illustrated in the following sections.


## 2.4. MC and MCB Tests under Model 3

Thep values of the Fisher exact test in each stratum are P1=0.80073, P2=0.57143, and P3=0.14706. So, P0=P3=0.14706 and PMC=0.3795 by expression (4). In order to apply method MCB the critical regions Rj∗ (j=1 and 2) must be determined to the objective error α=0.14706=P0=α3∗. For j=1, 9≤x1≤11 with Pr⁡{x1=11∣H1}=0.2862>P0; thus R1∗=ϕ and α1∗=0. This same occurs for j=2 (α2∗=0). For expression (5), PMCB=0.1471 (smaller than PJung). Generally speaking the critical region of Birch [9] and Jung [10] has the form S=∑jxj≥S0=∑jxj0, while that of method MCB is in the form ∪{xj≥xj∗}, with xj∗≥xj0. It can be proved that this generally implies that the Birch method will yield ap value smaller than or equal to that of method MCB when thep values Pi are similar or when the observed values xj0 are the highest possible.Let us now apply an asymptotic test. In general, whatever the model is, the appropriate statistic is the chi-squared statistic [6]:(6)χj=xjy-j-yjx-j-cjmjnjzjz-j/Nj-1.The appropriate value for the continuity correction cj depends on the assumed model, and that value is what causes the results of the three models to be different. When cj=0(∀j) Pearson’s classic chi-squared statistic is obtained. In the case here of Model 3, by making cj=Nj/2 the classic statistic χ3j (or the Yates chi-squared statistic) is obtained. Its maximum value is reached in stratum 3 (χ33=1.0308), which yields thep values P0=0.15132 and PMC=0.3887. In order to apply method MCB, one must obtain in the other two strata the first value χ3j∗ of χ3j which is larger than or equal to χ33. As there is none, α1∗=α2∗=0, α3∗ = 0.15132 and PMCB=0.1513. Note that the asymptoticp values are similar to the exact ones, both with method MC and with method MCB. Despite the small size of the samples, the asymptotic methods function well (something which also occurs with the rest of the methods, as will be seen).


## 2.5. MC and MCB Tests under Model 2

The data in the example in reality proceeds from Model 2. In determining thep value Pj of an observed table of Model 2 (xj0,yj0∣mj,nj) the same steps are followed as in Model 3 (except the last, which is special): (1) define an order statistic Sj(xj,yj∣mj,nj), which does not need to be the same one in each stratum; (2) determine the set of points Rj={(xj,yj∣mj,nj)∣Sj(xj,yj∣mj,nj)≥Sj0(xj0,yj0∣mj,nj)}; (3) calculate the probability of Rj under Hj: pj=qj=πj given by αjπj=∑RjCmj,xjCnj,yjπjzj1-πjz-j; and (4) determine thep value as Pj=max⁡πj⁡αj(πj), where πj is the nuisance parameter that is eliminated by maximization (the most complicated step). Note that πj is the marginal probability of columns under Hj. In the case of Model 3 there is only one order statistic Sj possible [17], because the convexity of the region Rj must be verified and the points ordered “from the largest to the smallest value of xj.” In the case of Model 2 there are many possible test statistics. One of these is the order Fj of Boschloo [18]: order the points from the smaller to larger value of its one-tailedp value obtained using the Fisher exact test. It is already known [19] that the unconditional test based on the order Fj is uniformly more powerful (UMP) than Fisher’s own exact test. Although no unconditional order is UMP compared to the rest, the generally most powerful order is [3] the complex statistic Bj of Barnard [20].As far as we know, the only program that carries out the above calculations for the statisticBj is SMP.EXE, which may be obtained free of charge at http://www.ugr.es/local/bioest/software.htm. The program also gives the solution for other simpler test statistics. Using this program, because the minimump value is P3=0.05653 then PMC=0.1602. In order to obtain PMCB one has to proceed as in the previous section, although now the process is now somewhat more difficult. In stratum 1, the table (x1,y1)=(11,10) is the one that gives a largerp value α1∗=0.05462, but smaller than or equal to α3∗=0.05653. In stratum 2 the results are (x2,y2)=(4,1) and α2∗=0.05069. So, PMCB=0.1533, a value which is similar to that of PBirch (the results are alike if other order statistics of the program SMP.EXE are used). It can be seen that the use of the unconditional method allows the inherent conservatism in the definitions of methods MC and MCB to be reduced.In order to carry out the asymptotic test we shall use the optimal version of expression (6) for Model 2: χ2j is the value of expression (6) when cj=1 (or 2) if mj≠nj (or mj=nj) [6]. Now the maximum value is χ23=1.5805, whereby P3=0.05700 and PMC=0.1614 (a value, i.e., very near the 0.1602 of the exact method). Proceeding as above, the first values χ2j∗ of χ2j (j=1 or 2) which are larger than or equal to χ23 are χ21∗=1.5822 for (x1,y1)=(10,8) and χ22∗=1.6056 for (x2,y2)=(2,0). This makes α1∗=0.05680, α2∗=0.05418, and PMCB=0.1588 (which is also a value, i.e., very close to the 0.1533 of the exact method).


## 2.6. MC and MCB Tests under Models 1 and 0

Let us suppose now that the data contained in the example in Table2 proceed from Model 1. The determining of thep value Pj of an observed table (xj0,yj0,y-j0∣nj) is the same as in Model 2, but now the calculations are more complicated because the nuisance parameters must be eliminated (the marginal probabilities of rows and columns under Hj). Again there are many possible test statistics [1, 21], although none of them is UMP compared to the others. The generally more powerful statistic is again Barnard’s Bj statistic [22] and, as far as we know, the only program to apply it is TMP.EXE which may be obtained free of charge at http://www.ugr.es/local/bioest/software.htm. The program also gives the solution using other simpler test statistics. Using this program, the minimump value is P3=0.04472 and from this PMC=0.1282 (substantially smaller than PBirch).In order to carry out the asymptotic test we shall use the optimal version of expression (6) for Model 1: χ1j is the value of expression (6) when cj=0.5∀j [6]. The statistic is given by Pirie and Hamdan [23]. Now the maximum value is χ13=1.6149, with the result that P3=0.05317 and PMC=0.1512.Method MCB (which is very laborious to calculate) is omitted here, because the large number of points in the sample space will makeα1∗≈α2∗≈α3∗=P3 and so PMC≈PMCB. Note that stratum 1 under Model 2 consists of (m1+1)(n1+1)=(11+1)×(13+1)=168 points, but under Model 1 it consists of (N1+1)(N1+2)(N1+3)/6=25×26×27/6= 2,925 points. For similar reasons, Model 0 can be treated as if it were Model 1 (by conditioning in the real obtained values Nj).


## 3. Sample Size under Model 2

### 3.1. Example and Conditional Solutions Obtained by Classic Methods

Jung [10] proposes a sample size calculation for its stratified exact test. For the example described in Section 2.1, he accepts Model 2 and sets out a case study with Nj=N/3 and mj=N/6. The aim is to determine the value of N for the alternative hypotheses (θ1,θ2,θ3)=(1,30,30), a type I error of α-=0.1 and a power of 1-β-=0.8. Jung also assumes that (q1,q2,q3)=(0.9,0.75,0.6), so that under the alternative hypothesis pj=θjqj/(q-j+θjqj). His solution is NJung=62. From what can be deduced from other parts of his paper, the detailed solution is n1=n2=20, n3=22, m1=m2=10, and m3=11. These values are included in Table 4 (as well as the most relevant ones obtained in all the following). This sample size provides a real error of α-Jung=0.0565 and a real power of 1-β-Jung=0.8105.Table 4
Sample sizes by stratum (mj=nj) and global (N) obtained by various methods for the data of Jung’s example [10] under Model 2. Each asymptotic method is placed immediately below the exact method from which it proceeds.
Model
Test
Procedure
Stratum
N
1
2
3
Conditional
Exact
Jung
10, 10
10, 10
11, 11
62
Asymptotic
χ
MH without cc
8, 8
8, 8
9, 9
50
χ
MH with cc
11, 11
11, 11
12, 12
68
Unconditional
Exact
MC (Barnard’s order)
12, 12
12, 12
13, 13
74
10, 11
11, 12
12, 13
69
1, 2
11, 12
12, 13
51
Asymptotic
MC (χ2 with cc)
11, 11
12, 12
12, 12
70
10, 11
11, 12
12, 13
69
1, 2
11, 12
12, 13
51
Note:χMH: χ of Mantel-Haenszel; MC = multiple comparisons method; χ2=χ of Model 2.Let us suppose that generallynj=kjmj, with kj known values, and that the aim is to determine the values mj which guarantee the desired power, which implies using Model 2. The reasoning that follows is the same as that with which Casagrande et al. [24] and Fleiss et al. [25] obtained the classic formula for sample size in the comparison of two independent proportions. The solutions without cc that follow are a special case of those of Jung et al. [11]. The test χMHc in Section 2.2 is based on the statistic ∑(xj-Ej)-0.5=∑D^j-0.5, where D^j=(kjxj-yj)/(kj+1). Because D^j is distributed asymptotically as a normal distribution with the mean Dj=kjmj(pj-qj)/(kj+1) and the variance Sj2=kjmj(kjpjp-j+qjq-j)/kj+12, D^=∑D^j will be asymptotically normal with the mean D=∑Dj and the variance S2=∑Sj2. Under H,pj=qj=πj(∀j), with the result that the mean and variance of D^ will be DH=0 and of SH2=∑kjmjπjπ-j/(kj+1), respectively, with π-j=1-πj. Because under H the nuisance parameter πj is estimated by zj/Nj, it is usual to substitute it by its average value under K, that is, by πj=(pj+kjqj)/(kj+1); hence π-j=(p-j+kjq-j)/(kj+1). Consequently the statistic D^ will reach significance in the critical value D∗ which verifies α-=Pr⁡{D^≥D∗∣H}=Pr⁡{z≥(D∗-0.5)/SH}, in which the number 0.5 corresponds to the cc indicated above and z refers to a normal standard variable. Therefore D∗=z1-α-SH+0.5, with z1-α- the 100×(1-α-)-percentile of the normal standard distribution. Under K the parameters D=DK and S2=SK2 are obtained in the values pj and qj which specify K: DK=∑kjmj(pj-qj)/(kj+1) and SK2=∑kjmj(kjpjp-j+qjq-j)/kj+12. Given the above, the error beta will be(7)β-MHc=Pr⁡D^≤D∗∣K=Pr⁡z≤z1-α-SH+1-DKSK.If the solution is restricted to the case ofmj=m(∀j), by making -z1-β- equal to the fraction of expression (7) and by working out m, one obtains the equation mδ-m0.5[z1-α-σ0+z1-β-σ1]-0.5=0, where δ=∑kj(pj-qj)/(kj+1), σ02=∑kjπjπ-j/(kj+1), and σ12=∑kj(kjpjp-j+qjq-j)/kj+12; therefore(8)m=m041+1+2m0δ2wherem0=z1-α-σ0+z1-β-σ1δ2.The solutions m0 and m are those of the tests χMH and χMHc, respectively. Frequently kj=1(∀j); in this case expression (8) explicitly takes the following form:(9)m=m041+1+4m0∑pj-qj2withm0=z1-α-∑pj+qjp-j+q-j/2+z1-β-∑pjp-j+qjq-j∑pj-qj2.For the example at the beginning of this section (in whichkj=1), if at first we restrict the solution to m1=m2=m3=m, expression (9) indicates that m0=8.27 and m=11.3. Assuming that in this example the values of mj are allowed to differ at most by 1, then the solution that is sought must be 8≤mj≤9(∀j) without cc or 11≤mj≤12(∀j) with cc. In the second phase, expression (7) indicates that in m1=m2=11 and m3=12 is the first time that β-MHc (=0.183) ≤ 0.2, so that this is the solution with cc that was being sought (N=68). The solution without cc is obtained in the same way (m1=m2=8, m3=9, and N=50), but it is too liberal.


### 3.2. Solution Using the Exact Method MC

For fixed values of the global errorα- and the sample sizes (mj, nj), the method MC described in Section 2.3 allows one to obtain the critical region RjMC and the real type 1 error α-MC≤α-. Moreover, let βjMC be the error beta for each individual test, with 1-βjMC equal to the probability of the region βjMC under Kj. Because of the way method MC was defined, the real global error beta will be(10)β-MC=∏jβjMC=∏j=1J1-∑RjMCmjxjnjyjpjxjp-jx-jqjyjq-jy-j.If β-MC≤β-, these values {(mj,nj)} guarantee the desired power. If β-MC>β-, it is necessary to increase some values of mj and/or nj and to repeat the previous procedure.Let us initially assume thatmj=nj. The process for determining the sample sizes mj may be shortened if it begins with a value mj=m(∀j) like that of expression (8). With the method MC, one obtains that m=12 is not a solution because β-MC=0.2262>0.2, but m=13 is a solution because β-MC=0.1723≤0.2. The solution can now be refined allowing values mj to differ by a maximum of one. The final solution is m1=m2=12, m3=13 (N=74), α-MC=0.0881, and β-MC=0.1880.Unconditioned tests are more powerful when the sample sizes are slightly different [3], since the number of ties that produces any statistic Sj that is used is reduced. By planning nj=mj+1 and making the values ​​of mj consecutive, the solution m1=10, m2=11, and m3=12 (N=69) is obtained, with α-MC=0.0924 and β-MC=0.1821 (the solution based on nj=mj-1 is worse). Actually, stratum 1 is of virtually no interest since in it H1=K1. Despite everything, if it is introduced, the configuration nj=mj+1, m1=1, m2=11 and m3=12 (N=51) is correct because α-MC=0.0602 and β-MC=0.1833.


### 3.3. Solution Using the Asymptotic Method MC Based on the Chi-Square Test with cc

In the following the procedure is the same as in Section2.1, assuming for the moment that mj and nj can be any values. The numerator of χ2j may be written as d^j-cj, where cj is the cc of Model 2 (cj=2 or 1 depending on whether mj and nj are equal or different, resp.) and d^j=njxj-mjyj (the base statistic for the test) is asymptotically normal with mean dj=mjnj(pj-qj) and variance sj2=mjnj(njpjp-j+mjqjq-j).UnderHj, pj=qj=πj and d^j is asymptotically normal with mean 0 and variance sHj2=Njmjnjπjπ-j, with π-j=1-πj. Because under Hj the nuisance parameter πj is estimated by zj/Nj, it is usual to substitute it by its average value under Kj, that is, by πj=(mjpj+njqj)/Nj; hence π-j=(mjp-j+njq-j)/Nj. If each individual test is realized to the error α of expression (3), the critical value dj∗ for d^j will verify α=Pr⁡{d^j≥dj∗∣Hj}=Pr⁡{z≥(dj∗-cj)/sHj}, in which the value cj corresponds to the cc indicated above; therefore dj∗=z1-αsHj+cj.UnderKj, d^j is asymptotically normal with mean dKj=mjnj(pj-qj) and variance sKj2=mjnjnjpjp-j+mjqjq-j. Thus βj=Pr⁡{d^j≤dj∗∣Kj}=Pr⁡{z≤(z1-αsHj+cj-dKj)/sKj} and applying the first equality in expression (10)(11)β-MC=∏jβjMC=∏jPr⁡z≤z1-αsHj+cj-dKjsKj,in particular, if mj=nj=m(∀j), then cj=2, and(12)β-MC=∏jPr⁡z≤z1-αmmpj+qjp-j+q-j/2+2-m2pj-qjmmpjp-j+qjq-j.For the data in the example,α=1-0.91/3=0.03451 and by making mj=m(∀j) the solution, the solution based on expression (12) is m=12. This solution can be refined by allowing the values of mj to differ by a maximum of one, in which case the new solution, now based on expression (11), is m1=11, m2=m3=12 (N=70) with β-MC=0.1901. If a cc is not carried out the solution is too liberal: m1=m2=10, m1=11 (N=62) with β-MC=0.1984. By planning nj=mj+1 and making the values ​​of mj consecutive, the solution m1=10, m2=11, and m3=12 is obtained (as in the exact method), with α-MC= β-MC=0.1759. This is the same result as for the configuration at the end of the previous section.


## 3.1. Example and Conditional Solutions Obtained by Classic Methods

Jung [10] proposes a sample size calculation for its stratified exact test. For the example described in Section 2.1, he accepts Model 2 and sets out a case study with Nj=N/3 and mj=N/6. The aim is to determine the value of N for the alternative hypotheses (θ1,θ2,θ3)=(1,30,30), a type I error of α-=0.1 and a power of 1-β-=0.8. Jung also assumes that (q1,q2,q3)=(0.9,0.75,0.6), so that under the alternative hypothesis pj=θjqj/(q-j+θjqj). His solution is NJung=62. From what can be deduced from other parts of his paper, the detailed solution is n1=n2=20, n3=22, m1=m2=10, and m3=11. These values are included in Table 4 (as well as the most relevant ones obtained in all the following). This sample size provides a real error of α-Jung=0.0565 and a real power of 1-β-Jung=0.8105.Table 4
Sample sizes by stratum (mj=nj) and global (N) obtained by various methods for the data of Jung’s example [10] under Model 2. Each asymptotic method is placed immediately below the exact method from which it proceeds.
Model
Test
Procedure
Stratum
N
1
2
3
Conditional
Exact
Jung
10, 10
10, 10
11, 11
62
Asymptotic
χ
MH without cc
8, 8
8, 8
9, 9
50
χ
MH with cc
11, 11
11, 11
12, 12
68
Unconditional
Exact
MC (Barnard’s order)
12, 12
12, 12
13, 13
74
10, 11
11, 12
12, 13
69
1, 2
11, 12
12, 13
51
Asymptotic
MC (χ2 with cc)
11, 11
12, 12
12, 12
70
10, 11
11, 12
12, 13
69
1, 2
11, 12
12, 13
51
Note:χMH: χ of Mantel-Haenszel; MC = multiple comparisons method; χ2=χ of Model 2.Let us suppose that generallynj=kjmj, with kj known values, and that the aim is to determine the values mj which guarantee the desired power, which implies using Model 2. The reasoning that follows is the same as that with which Casagrande et al. [24] and Fleiss et al. [25] obtained the classic formula for sample size in the comparison of two independent proportions. The solutions without cc that follow are a special case of those of Jung et al. [11]. The test χMHc in Section 2.2 is based on the statistic ∑(xj-Ej)-0.5=∑D^j-0.5, where D^j=(kjxj-yj)/(kj+1). Because D^j is distributed asymptotically as a normal distribution with the mean Dj=kjmj(pj-qj)/(kj+1) and the variance Sj2=kjmj(kjpjp-j+qjq-j)/kj+12, D^=∑D^j will be asymptotically normal with the mean D=∑Dj and the variance S2=∑Sj2. Under H,pj=qj=πj(∀j), with the result that the mean and variance of D^ will be DH=0 and of SH2=∑kjmjπjπ-j/(kj+1), respectively, with π-j=1-πj. Because under H the nuisance parameter πj is estimated by zj/Nj, it is usual to substitute it by its average value under K, that is, by πj=(pj+kjqj)/(kj+1); hence π-j=(p-j+kjq-j)/(kj+1). Consequently the statistic D^ will reach significance in the critical value D∗ which verifies α-=Pr⁡{D^≥D∗∣H}=Pr⁡{z≥(D∗-0.5)/SH}, in which the number 0.5 corresponds to the cc indicated above and z refers to a normal standard variable. Therefore D∗=z1-α-SH+0.5, with z1-α- the 100×(1-α-)-percentile of the normal standard distribution. Under K the parameters D=DK and S2=SK2 are obtained in the values pj and qj which specify K: DK=∑kjmj(pj-qj)/(kj+1) and SK2=∑kjmj(kjpjp-j+qjq-j)/kj+12. Given the above, the error beta will be(7)β-MHc=Pr⁡D^≤D∗∣K=Pr⁡z≤z1-α-SH+1-DKSK.If the solution is restricted to the case ofmj=m(∀j), by making -z1-β- equal to the fraction of expression (7) and by working out m, one obtains the equation mδ-m0.5[z1-α-σ0+z1-β-σ1]-0.5=0, where δ=∑kj(pj-qj)/(kj+1), σ02=∑kjπjπ-j/(kj+1), and σ12=∑kj(kjpjp-j+qjq-j)/kj+12; therefore(8)m=m041+1+2m0δ2wherem0=z1-α-σ0+z1-β-σ1δ2.The solutions m0 and m are those of the tests χMH and χMHc, respectively. Frequently kj=1(∀j); in this case expression (8) explicitly takes the following form:(9)m=m041+1+4m0∑pj-qj2withm0=z1-α-∑pj+qjp-j+q-j/2+z1-β-∑pjp-j+qjq-j∑pj-qj2.For the example at the beginning of this section (in whichkj=1), if at first we restrict the solution to m1=m2=m3=m, expression (9) indicates that m0=8.27 and m=11.3. Assuming that in this example the values of mj are allowed to differ at most by 1, then the solution that is sought must be 8≤mj≤9(∀j) without cc or 11≤mj≤12(∀j) with cc. In the second phase, expression (7) indicates that in m1=m2=11 and m3=12 is the first time that β-MHc (=0.183) ≤ 0.2, so that this is the solution with cc that was being sought (N=68). The solution without cc is obtained in the same way (m1=m2=8, m3=9, and N=50), but it is too liberal.


## 3.2. Solution Using the Exact Method MC

For fixed values of the global errorα- and the sample sizes (mj, nj), the method MC described in Section 2.3 allows one to obtain the critical region RjMC and the real type 1 error α-MC≤α-. Moreover, let βjMC be the error beta for each individual test, with 1-βjMC equal to the probability of the region βjMC under Kj. Because of the way method MC was defined, the real global error beta will be(10)β-MC=∏jβjMC=∏j=1J1-∑RjMCmjxjnjyjpjxjp-jx-jqjyjq-jy-j.If β-MC≤β-, these values {(mj,nj)} guarantee the desired power. If β-MC>β-, it is necessary to increase some values of mj and/or nj and to repeat the previous procedure.Let us initially assume thatmj=nj. The process for determining the sample sizes mj may be shortened if it begins with a value mj=m(∀j) like that of expression (8). With the method MC, one obtains that m=12 is not a solution because β-MC=0.2262>0.2, but m=13 is a solution because β-MC=0.1723≤0.2. The solution can now be refined allowing values mj to differ by a maximum of one. The final solution is m1=m2=12, m3=13 (N=74), α-MC=0.0881, and β-MC=0.1880.Unconditioned tests are more powerful when the sample sizes are slightly different [3], since the number of ties that produces any statistic Sj that is used is reduced. By planning nj=mj+1 and making the values ​​of mj consecutive, the solution m1=10, m2=11, and m3=12 (N=69) is obtained, with α-MC=0.0924 and β-MC=0.1821 (the solution based on nj=mj-1 is worse). Actually, stratum 1 is of virtually no interest since in it H1=K1. Despite everything, if it is introduced, the configuration nj=mj+1, m1=1, m2=11 and m3=12 (N=51) is correct because α-MC=0.0602 and β-MC=0.1833.


## 3.3. Solution Using the Asymptotic Method MC Based on the Chi-Square Test with cc

In the following the procedure is the same as in Section2.1, assuming for the moment that mj and nj can be any values. The numerator of χ2j may be written as d^j-cj, where cj is the cc of Model 2 (cj=2 or 1 depending on whether mj and nj are equal or different, resp.) and d^j=njxj-mjyj (the base statistic for the test) is asymptotically normal with mean dj=mjnj(pj-qj) and variance sj2=mjnj(njpjp-j+mjqjq-j).UnderHj, pj=qj=πj and d^j is asymptotically normal with mean 0 and variance sHj2=Njmjnjπjπ-j, with π-j=1-πj. Because under Hj the nuisance parameter πj is estimated by zj/Nj, it is usual to substitute it by its average value under Kj, that is, by πj=(mjpj+njqj)/Nj; hence π-j=(mjp-j+njq-j)/Nj. If each individual test is realized to the error α of expression (3), the critical value dj∗ for d^j will verify α=Pr⁡{d^j≥dj∗∣Hj}=Pr⁡{z≥(dj∗-cj)/sHj}, in which the value cj corresponds to the cc indicated above; therefore dj∗=z1-αsHj+cj.UnderKj, d^j is asymptotically normal with mean dKj=mjnj(pj-qj) and variance sKj2=mjnjnjpjp-j+mjqjq-j. Thus βj=Pr⁡{d^j≤dj∗∣Kj}=Pr⁡{z≤(z1-αsHj+cj-dKj)/sKj} and applying the first equality in expression (10)(11)β-MC=∏jβjMC=∏jPr⁡z≤z1-αsHj+cj-dKjsKj,in particular, if mj=nj=m(∀j), then cj=2, and(12)β-MC=∏jPr⁡z≤z1-αmmpj+qjp-j+q-j/2+2-m2pj-qjmmpjp-j+qjq-j.For the data in the example,α=1-0.91/3=0.03451 and by making mj=m(∀j) the solution, the solution based on expression (12) is m=12. This solution can be refined by allowing the values of mj to differ by a maximum of one, in which case the new solution, now based on expression (11), is m1=11, m2=m3=12 (N=70) with β-MC=0.1901. If a cc is not carried out the solution is too liberal: m1=m2=10, m1=11 (N=62) with β-MC=0.1984. By planning nj=mj+1 and making the values ​​of mj consecutive, the solution m1=10, m2=11, and m3=12 is obtained (as in the exact method), with α-MC= β-MC=0.1759. This is the same result as for the configuration at the end of the previous section.



---

*Source: 147038-2015-05-14.xml*