betaFeedback

WorksMathematics

The Cochran–Mantel–Haenszel test as a test of the average treatment effect in stratified randomized trials

Abstract

This note revisits the Cochran–Mantel–Haenszel (CMH) test in light of the increasing use of causal inference methods in clinical trials. It shows that the CMH test statistic can be interpreted as a standardized version of the augmented inverse probability weighted (AIPW) estimate of the causal average treatment effect. Consequently, it is not restricted to an interpretation as a test of the common-odds ratio in a stratified logistic regression model. The note then discusses conditional and unconditional variances for this estimator as well as variance estimation and its implications for testing. The results clarify the relationship between the classical conditional CMH test and Wald-type AIPW tests, and show that, under equal treatment allocation, the CMH test is an asymptotically exact test of the weak null hypothesis of zero average treatment effect, without any restriction on the heterogeneity of stratum-specific effects. Under unequal allocation, it can be liberal or conservative. A simulation study supports these findings.

Introduction

The Cochran–Mantel–Haenszel (CMH) test [9] has been a workhorse of statistical inference for binary endpoints in clinical trials for decades. In textbooks, it is usually introduced as a test of the null hypothesis that the common odds ratio is 1 in a logistic regression model with a treatment effect and a stratum effect but no interaction, against the alternative that this common odds ratio differs from 1.

In recent years, causal inference has become more prominent in clinical trials. This has led to increased awareness of the role of covariates in the analysis of clinical trial data. Methods such as augmented inverse probability weighting (AIPW) [15, 7] are now applied in clinical trials, since it has been recognized that these methods allow unbiased estimation of treatment effects under weaker model assumptions than those required by the linear and nonlinear regression models that had been predominant before; see, for example, Ye et al. [ [16] and Ye et al. [ [17].

In this note, we revisit the CMH test from a causal inference perspective. Under stratified randomization, the numerator of the CMH statistic is an unbiased estimator of the average treatment effect (ATE). It coincides with the AIPW, IPW and standardization estimators for any outcome model using the stratification as the only factor. The question addressed here is therefore not which estimator to use, but how to standardize it for testing.

The paper is organized as follows: In § 1.1, we quickly review the CMH test, representing it in a form that allows the connection with AIPW-estimation. § 2 establishes this connection: under stratified randomization, the AIPW estimator coincides with Δ^\hat{\Delta}, the estimator in the numerator of the CMH statistic, for any outcome model that depends on the stratum only, whether saturated or not and whether correctly specified or not. § 3 considers different variance estimators of the AIPW point estimate and discusses their appropriateness for different situations. § 4 discusses the consequences of using these different variance estimates in testing. § 5 shows that under 1:1 randomization the CMH test also controls the type I error for the weak null hypothesis of zero average treatment effect. § 6 compares the CMH test with the Wald test based on the AIPW estimator by simulation. The paper concludes with a discussion.

The CMH test as a test of weighted averages of stratum-specific risk differences

We are investigating a binary response Yi∼Bin⁡(1,πjiki)Y_i \sim\operatorname{Bin}(1,\pi_{j_i k_i}) and the comparison of two treatments in a clinical trial where ii denotes subjects, ji=0,1j_i = 0, 1 treatment group of subject ii and k=1,…,Kk = 1,\ldots,K enumerates the categories of a stratification factor with kik_i being subject ii’s stratum. We will from now on drop the index ii from jij_i, kik_i when possible without ambiguity. In stratum kk, let njkn_{jk} denote the number of patients assigned to treatment jj, and let rjkr_{jk} denote the number of responses among those njkn_{jk} patients.

Furthermore, assume that stratified randomization fixes the treatment fraction within each stratum, such that

n1knk=q,n0knk=1−q,nk=n0k+n1k,\frac{n_{1k}}{n_k}=q,\qquad\frac{n_{0k}}{n_k}=1-q,\qquad n_k=n_{0k}+n_{1k},

with the same allocation fraction qq for all strata.

Define the observed within-stratum response proportions and the pooled within-stratum response proportion

p1k=r1kn1k,p0k=r0kn0k,p⋅k=r0k+r1knk=qp1k+(1−q)p0k.p_{1k} = \frac{r_{1k}}{n_{1k}}, \qquad p_{0k} = \frac{r_{0k}}{n_{0k}}, \qquad p_{\cdot k} = \frac{r_{0k}+r_{1k}}{n_k} = q p_{1k} + (1-q) p_{0k}.

The Cochran–Mantel–Haenszel test statistic can then be written as

XCMH2=q(1−q)[∑k=1Knk(p1k−p0k)]2∑k=1Knk2p⋅k(1−p⋅k)nk−1.(1)X^2_{\mathrm{CMH}} = \frac{q(1-q)\left[\sum_{k=1}^{K} n_k(p_{1k}-p_{0k})\right]^2}{\sum_{k=1}^{K}\frac{n_k^2p_{\cdot k}(1-p_{\cdot k})}{n_k-1}}. \tag*{(1)}

A slightly simpler large-sample approximation is

XCMH2≈q(1−q)[∑k=1Knk(p1k−p0k)]2∑k=1Knkp⋅k(1−p⋅k).X^2_{\mathrm{CMH}} \approx\frac{q(1-q)\left[\sum_{k=1}^{K} n_k(p_{1k}-p_{0k})\right]^2}{\sum_{k=1}^{K}n_kp_{\cdot k}(1-p_{\cdot k})}.

Under the strong null hypothesis H0:π1k=π0kH_0:\pi_{1k}=\pi_{0k} for every stratum kk, XCMH2X^2_{\mathrm{CMH}} is asymptotically χ12\chi^2_1-distributed.

Connection with AIPW estimation

Let S∈{1,…,K}S \in\{1,\ldots,K\} denote stratum and Z∈{0,1}Z \in\{0,1\} treatment assignment, both interpreted as random variables. Every subject belongs to a stratum with Pr⁡(S=k)=ψk\Pr(S=k)=\psi_k, k=1,…,Kk=1,\ldots,K, where ∑k=1Kψk=1\sum_{k=1}^{K}\psi_k=1.

Due to stratified randomization, we have Pr⁡(Z=1∣S=k)=q,Pr⁡(Z=0∣S=k)=1−q\Pr(Z=1\mid S=k)=q,\Pr(Z=0\mid S=k)=1-q, the same in every stratum. Thus π1k=Pr⁡(Y=1∣Z=1,S=k)\pi_{1k}=\Pr(Y=1\mid Z=1,S=k), π0k=Pr⁡(Y=1∣Z=0,S=k)\pi_{0k}=\Pr(Y=1\mid Z=0,S=k). As the ATE, we use the population-average causal risk difference which is defined as

Δ=∑k=1Kψk(π1k−π0k).\Delta= \sum_{k=1}^{K}\psi_k(\pi_{1k}-\pi_{0k}).

Considering the nn subjects as a sample from a stratified population with nkn_k subjects from stratum kk, we have

(n1,…,nK)∼Multinomial⁡(n;ψ1,…,ψK).(n_1,\ldots,n_K) \sim\operatorname{Multinomial}(n;\psi_1,\ldots,\psi_K).

The estimator of the marginal risk difference is

Δ^=∑k=1Knkn(p1k−p0k)=1n∑k=1K(r1kq−r0k1−q).(2)\widehat{\Delta} = \sum_{k=1}^{K}\frac{n_k}{n}(p_{1k}-p_{0k}) = \frac{1}{n}\sum_{k=1}^{K}\left(\frac{r_{1k}}{q}-\frac{r_{0k}}{1-q}\right). \tag*{(2)}

This estimator is unbiased for Δ\Delta:

E(Δ^∣n1,…,nK)=∑k=1Knkn(π1k−π0k).E(\widehat{\Delta}\mid n_1,\ldots,n_K)=\sum_{k=1}^{K}\frac{n_k}{n}(\pi_{1k}-\pi_{0k}).

Taking expectation again over the multinomial distribution of (n1,…,nK)(n_1,\ldots,n_K),

E(Δ^)=∑k=1KE(nkn)(π1k−π0k)=∑k=1Kψk(π1k−π0k)=Δ.E(\widehat{\Delta})=\sum_{k=1}^{K}E\left(\frac{n_k}{n}\right)(\pi_{1k}-\pi_{0k})=\sum_{k=1}^{K}\psi_k(\pi_{1k}-\pi_{0k})=\Delta.

Comparing with equation (1), we see that due to ∑k=1Knk(p1k−p0k)=nΔ^\sum_{k=1}^{K}n_k(p_{1k}-p_{0k})=n\widehat{\Delta}, the numerator of the CMH test statistic is

q(1−q)n2Δ^ 2.q(1-q)n^2\widehat{\Delta}^{\,2}.

Hence, under stratified randomization with common treatment fraction qq, the square root of the CMH test statistic can be viewed as a standardized version of the estimator of the population-average risk difference. Its numerator estimates the marginal risk difference, while its denominator estimates the corresponding null standard deviation used for hypothesis testing.

Regarding the connection with AIPW estimation, let zi∈{0,1}z_i\in\{0,1\} and si∈{1,…,K}s_i\in\{1,\ldots,K\} be the realizations of ZZ and SS, respectively, of patient ii. An AIPW estimate of the treatment effect then has the form Δ^AIPW=μ^1AIPW−μ^0AIPW\widehat{\Delta}^{\mathrm{AIPW}}=\widehat{\mu}_1^{\mathrm{AIPW}}-\widehat{\mu}_0^{\mathrm{AIPW}} where

μ^1AIPW=1n∑i=1n[m^1(si)+ziq{Yi−m^1(si)}]\widehat{\mu}_1^{\mathrm{AIPW}}=\frac{1}{n}\sum_{i=1}^{n}\left[\widehat{m}_1(s_i)+\frac{z_i}{q}\{Y_i-\widehat{m}_1(s_i)\}\right]

and

μ^0AIPW=1n∑i=1n[m^0(si)+1−zi1−q{Yi−m^0(si)}].\widehat{\mu}_0^{\mathrm{AIPW}}=\frac{1}{n}\sum_{i=1}^{n}\left[\widehat{m}_0(s_i)+\frac{1-z_i}{1-q}\{Y_i-\widehat{m}_0(s_i)\}\right].

In this setup m^j(si)\widehat{m}_j(s_i) denotes the estimated response of a randomly selected patient in treatment group jj and stratum sis_i from some outcome model mj(k)m_j(k) predicting the response. The estimator is consistent under very mild regularity conditions in a causal inference framework even if the outcome model is misspecified [see e.g. Tsiatis, 2006].

We use an outcome model with a separate response probability mj(k)=πjkm_j(k)=\pi_{jk} for every cell (j,k)(j,k). It is well known that with such a saturated model, standardization, IPW and AIPW all give the same estimate Δ^\widehat{\Delta} [11, 7].

Because stratified randomization assigns the same fraction qq of patients to treatment in every stratum, both treatment arms have exactly the same stratum composition. There is therefore no imbalance between the arms for any adjustment to correct. Irrespective of whether the outcome model is correct or not, the terms involving m^j\widehat{m}_j cancel such that Δ^\widehat{\Delta} simplifies to the difference between the overall response proportions of the two arms, i.e.

Δ^AIPW=μ^1AIPW−μ^0AIPW=1n∑k=1Knk(p1k−p0k)=Δ^.\widehat{\Delta}^{\mathrm{AIPW}}=\widehat{\mu}_1^{\mathrm{AIPW}}-\widehat{\mu}_0^{\mathrm{AIPW}}=\frac{1}{n}\sum_{k=1}^{K}n_k(p_{1k}-p_{0k})=\widehat{\Delta}.

Stratification is only relevant to the variance used to standardize this estimate for testing, which is the subject of § 3–§ 5.

In this note, the strata are the only covariates. The outcome model mj(k)m_j(k) is a function of the stratum alone. Additional baseline covariates could be included in mjm_j. This would lead to a non-saturated AIPW estimator for which the exact identities above no longer hold. This is not considered here. The outcome model serves only as a device for estimating Δ\Delta. We also note that the AIPW estimator has the form of the generalized regression (GREG) estimator of survey sampling [12].

We emphasize that the exact equivalence between the CMH numerator and the AIPW estimator relies on the treatment fraction being the same in every stratum. In general, the CMH numerator is

∑k=1K(r1k−n1kr⋅knk)=∑k=1Kn1kn0knk(p1k−p0k),\sum_{k=1}^{K}\left(r_{1k}-\frac{n_{1k}r_{\cdot k}}{n_k}\right)=\sum_{k=1}^{K}\frac{n_{1k}n_{0k}}{n_k}(p_{1k}-p_{0k}),

i.e. a weighted sum of the stratum-specific risk differences with weights n1kn0k/nk=nkqk(1−qk)n_{1k}n_{0k}/n_k = n_kq_k(1-q_k), qk=n1k/nkq_k=n_{1k}/n_k. These weights reflect both the size of a stratum and how balanced the allocation within it is. Only if qk=qq_k=q for all kk are they proportional to nkn_k, so that the numerator is proportional to Δ\Delta. Otherwise the CMH numerator estimates a differently weighted average of the true stratum-specific risk differences δk=π1k−π0k\delta_k=\pi_{1k}-\pi_{0k}, which coincides with Δ\Delta only if all δk\delta_k are equal. The CMH test then remains a valid test of the strong null hypothesis, but its connection to Δ\Delta is lost. Under stratified block randomization the realized qkq_k differ from qq only through incomplete final blocks, so that the discrepancy is of order 1/n1/n and negligible for all practical purposes. Under simple randomization without stratification, the qkq_k still converge to qq, but only at rate n−1/2n^{-1/2}. The two estimators are then both consistent for Δ\Delta, but if the stratum-specific effects δk\delta_k differ, their difference is of the same order as their standard error, so their asymptotic variances are not the same. We do not pursue this case further.

Variance of Δ^\hat{\Delta}

This section considers Var⁡(Δ^)\operatorname{Var}(\hat{\Delta}) under different degrees of conditioning. The distinction between conditional and unconditional variances of post-stratified estimators is not new. Miratrix et al. [ [10] give a detailed treatment for general outcomes, both for post-stratification after complete randomization and for blocked designs. The expressions below are the corresponding results for a binary endpoint under stratified randomization with a common allocation fraction. We present them here because they make explicit how the denominator of the CMH statistic relates to these variances, which is the basis for § 4 and § 5.

Conditional variance given nkn_k and r⋅k=r0k+r1kr_{\cdot k}=r_{0k}+r_{1k}

The CMH test conditions on the observed stratum sizes nkn_k and the observed total number of responses in each stratum, r⋅k=r0k+r1kr_{\cdot k}=r_{0k}+r_{1k}. Under the strong null hypothesis

H0:π1k=π0kfor all k,H_0 : \pi_{1k} = \pi_{0k}\quad\text{for all }k,

the conditional distribution of r1kr_{1k} given nkn_k and r⋅kr_{\cdot k} is hypergeometric:

r1k∣nk,r⋅k∼Hypergeometric⁡(nk,r⋅k,n1k).r_{1k}\mid n_k,r_{\cdot k}\sim\operatorname{Hypergeometric}(n_k,r_{\cdot k},n_{1k}).

Its conditional mean and variance are

E(r1k∣nk,r⋅k)=n1kr⋅knk=q r⋅k,E(r_{1k}\mid n_k,r_{\cdot k})=\frac{n_{1k}r_{\cdot k}}{n_k}=q\,r_{\cdot k},

and

Var⁡(r1k∣nk,r⋅k)=n1kn0kr⋅k(nk−r⋅k)nk2(nk−1)=q(1−q)r⋅k(nk−r⋅k)nk−1.\operatorname{Var}(r_{1k}\mid n_k,r_{\cdot k})=\frac{n_{1k}n_{0k}r_{\cdot k}(n_k-r_{\cdot k})}{n_k^2(n_k-1)} =\frac{q(1-q)r_{\cdot k}(n_k-r_{\cdot k})}{n_k-1}.

Since

Δ^=1n∑k=1K(r1kq−r⋅k−r1k1−q),\widehat{\Delta}=\frac{1}{n}\sum_{k=1}^{K}\left(\frac{r_{1k}}{q}-\frac{r_{\cdot k}-r_{1k}}{1-q}\right),

and r⋅kr_{\cdot k} is fixed under this conditioning, only r1kr_{1k} is random. Rewriting

Δ^=1n∑k=1K(1q+11−q)r1k−1n(1−q)∑k=1Kr⋅k=1nq(1−q)∑k=1Kr1k−1n(1−q)∑k=1Kr⋅k\widehat{\Delta}=\frac{1}{n}\sum_{k=1}^{K}\left(\frac{1}{q}+\frac{1}{1-q}\right)r_{1k} -\frac{1}{n(1-q)}\sum_{k=1}^{K}r_{\cdot k} =\frac{1}{nq(1-q)}\sum_{k=1}^{K}r_{1k} -\frac{1}{n(1-q)}\sum_{k=1}^{K}r_{\cdot k}

one obtains

Var⁡(Δ^∣nk,r⋅k,k=1,…,K)=1n2q(1−q)∑k=1Knk2p⋅k(1−p⋅k)nk−1.\operatorname{Var}(\widehat{\Delta}\mid n_k,r_{\cdot k},k=1,\ldots,K) =\frac{1}{n^2q(1-q)}\sum_{k=1}^{K}\frac{n_k^2p_{\cdot k}(1-p_{\cdot k})}{n_k-1}.

For large nkn_k, this is approximated by

Var⁡(Δ^∣nk,r⋅k,k=1,…,K)≈1n2q(1−q)∑k=1Knkp⋅k(1−p⋅k).\operatorname{Var}(\widehat{\Delta}\mid n_k,r_{\cdot k},k=1,\ldots,K) \approx\frac{1}{n^2q(1-q)}\sum_{k=1}^{K}n_kp_{\cdot k}(1-p_{\cdot k}).

Hence, the CMH statistic can be written as

XCMH2=Δ^2Var⁡(Δ^∣nk,r⋅k,k=1,…,K).X^2_{\mathrm{CMH}}=\frac{\widehat{\Delta}^2}{\operatorname{Var}(\widehat{\Delta}\mid n_k,r_{\cdot k},k=1,\ldots,K)}.

Conditional variance given nkn_k only

If one conditions only on the observed stratum sizes nkn_k, but not on the observed total responses r⋅kr_{\cdot k}, then under the data-generating model

r1k∼Bin⁡(qnk,π1k),r0k∼Bin⁡((1−q)nk,π0k),r_{1k}\sim\operatorname{Bin}(qn_k,\pi_{1k}),\qquad r_{0k}\sim\operatorname{Bin}((1-q)n_k,\pi_{0k}),

independently across treatment groups within each stratum. Hence

E(Δ^∣n1,…,nK)=∑k=1Knkn(π1k−π0k),(3)E(\widehat{\Delta} \mid n_1,\ldots,n_K)=\sum_{k=1}^{K}\frac{n_k}{n}(\pi_{1k}-\pi_{0k}), \tag*{(3)}

and

Var⁡(Δ^∣n1,…,nK)=1n2∑k=1Knk[π1k(1−π1k)q+π0k(1−π0k)1−q].(4)\operatorname{Var}(\widehat{\Delta} \mid n_1,\ldots,n_K)=\frac{1}{n^2}\sum_{k=1}^{K}n_k\left[\frac{\pi_{1k}(1-\pi_{1k})}{q}+\frac{\pi_{0k}(1-\pi_{0k})}{1-q}\right]. \tag*{(4)}

Under the strong null hypothesis π1k=π0k=πk\pi_{1k}=\pi_{0k}=\pi_k for all kk, this simplifies to

Var⁡(Δ^∣n1,…,nK;H0)=1n2q(1−q)∑k=1Knkπk(1−πk).\operatorname{Var}(\widehat{\Delta} \mid n_1,\ldots,n_K;H_0)=\frac{1}{n^2q(1-q)}\sum_{k=1}^{K}n_k\pi_k(1-\pi_k).

A plug-in estimator replaces πk\pi_k by p⋅kp_{\cdot k}, yielding

Var⁡^(Δ^∣n1,…,nK;H0)=1n2q(1−q)∑k=1Knkp⋅k(1−p⋅k),\widehat{\operatorname{Var}}(\widehat{\Delta} \mid n_1,\ldots,n_K;H_0)=\frac{1}{n^2q(1-q)}\sum_{k=1}^{K}n_kp_{\cdot k}(1-p_{\cdot k}),

which coincides with the large-sample approximation to the conditional CMH variance above. Thus the familiar large-sample CMH test can also be seen as using the null variance of Δ^\widehat{\Delta} conditional only on the stratum sizes nkn_k.

Alternatively, one may estimate the variance conditional on nkn_k by plugging the observed treatment-specific proportions p1kp_{1k} and p0kp_{0k} directly into equation (4). Under the null hypothesis, the null-based and general plug-in versions are asymptotically equivalent. Away from the null, however, they differ.

Unconditional variance

The unconditional variance can be obtained via the law of total variance:

Var⁡(Δ^)=E[Var⁡(Δ^∣n1,…,nK)]+Var⁡(E(Δ^∣n1,…,nK)).\operatorname{Var}(\widehat{\Delta})=E\left[\operatorname{Var}(\widehat{\Delta}\mid n_1,\ldots,n_K)\right]+\operatorname{Var}\left(E(\widehat{\Delta}\mid n_1,\ldots,n_K)\right).

From equation (3),

Var⁡(E(Δ^∣n1,…,nK))=Var⁡(∑k=1Knknδk),δk=π1k−π0k.\operatorname{Var}\left(E(\widehat{\Delta}\mid n_1,\ldots,n_K)\right)=\operatorname{Var}\left(\sum_{k=1}^{K}\frac{n_k}{n}\delta_k\right),\qquad\delta_k=\pi_{1k}-\pi_{0k}.

Using (n1,…,nK)∼Multinomial⁡(n;ψ1,…,ψK)(n_1,\ldots,n_K)\sim\operatorname{Multinomial}(n;\psi_1,\ldots,\psi_K),

Var⁡(nk)=nψk(1−ψk),Cov⁡(nk,nℓ)=−nψkψℓ,k≠ℓ\operatorname{Var}(n_k)=n\psi_k(1-\psi_k),\qquad\operatorname{Cov}(n_k,n_\ell)=-n\psi_k\psi_\ell,\quad k\ne\ell

and

(∑k=1Kψkδk)2=∑k=1Kψk2δk2+2∑k<ℓψkψℓδkδℓ.\left(\sum_{k=1}^{K}\psi_k\delta_k\right)^2=\sum_{k=1}^{K}\psi_k^2\delta_k^2+2\sum_{k<\ell}\psi_k\psi_\ell\delta_k\delta_\ell.

It follows that

Var⁡(E(Δ^∣n1,…,nK))=1n[∑k=1Kψkδk2−(∑k=1Kψkδk)2].\operatorname{Var}(E(\hat{\Delta}\mid n_1,\ldots,n_K))=\frac{1}{n}\left[\sum_{k=1}^{K}\psi_k\delta_k^2-\left(\sum_{k=1}^{K}\psi_k\delta_k\right)^2\right].

Taking expectation over the multinomial distribution (cf. equation (4)) gives

E[Var⁡(Δ^∣n1,…,nK)]=1n∑k=1Kψk[π1k(1−π1k)q+π0k(1−π0k)1−q].E\left[\operatorname{Var}(\hat{\Delta}\mid n_1,\ldots,n_K)\right]=\frac{1}{n}\sum_{k=1}^{K}\psi_k\left[\frac{\pi_{1k}(1-\pi_{1k})}{q}+\frac{\pi_{0k}(1-\pi_{0k})}{1-q}\right].

Combining terms,

Var⁡(Δ^)=1n∑k=1Kψk[π1k(1−π1k)q+π0k(1−π0k)1−q]+1n[∑k=1Kψkδk2−(∑k=1Kψkδk)2]=1n∑k=1Kψk[π1k(1−π1k)q+π0k(1−π0k)1−q]+1nVar⁡ψ(D),(5)\begin{aligned} \operatorname{Var}(\hat{\Delta})=\frac{1}{n}\sum_{k=1}^{K}\psi_k\left[\frac{\pi_{1k}(1-\pi_{1k})}{q}+\frac{\pi_{0k}(1-\pi_{0k})}{1-q}\right]+\frac{1}{n}\left[\sum_{k=1}^{K}\psi_k\delta_k^2-\left(\sum_{k=1}^{K}\psi_k\delta_k\right)^2\right] \\ &=\frac{1}{n}\sum_{k=1}^{K}\psi_k\left[\frac{\pi_{1k}(1-\pi_{1k})}{q}+\frac{\pi_{0k}(1-\pi_{0k})}{1-q}\right]+\frac{1}{n}\operatorname{Var}_{\psi}(D), \tag*{(5)} \end{aligned}

where Var⁡ψ(D)\operatorname{Var}_{\psi}(D) denotes the variance of the random variable DD taking the value δk\delta_k with probability ψk\psi_k.

Compared with the variance conditional on nkn_k, the unconditional variance contains the additional term 1nVar⁡ψ(D)\frac{1}{n}\operatorname{Var}_{\psi}(D), which reflects random variation in the stratum composition. It vanishes when all δk\delta_k are equal.

Choice of variance estimate for testing

The CMH test uses the variance conditional on the observed nkn_k and r⋅kr_{\cdot k}, yielding an exact conditional test if the exact hypergeometric distribution is used, and an asymptotic χ2\chi^2-test when the variance is plugged into the usual quadratic form.

By contrast, a causal inference interpretation would view the parameter Δ\Delta as a marginal superpopulation parameter. Typically, Wald-type inference would be used to estimate the unconditional variance corresponding to repeated sampling from the superpopulation. In the present discrete-strata randomized setting, that variance is given by equation (5). In practice, the unknown parameters in the formula are replaced by their sample analogues pjkp_{jk} and nk/nn_k/n.

Since the CMH numerator coincides with the AIPW estimator in the present setting, the relevant comparison is not between different point estimators but between different variance choices for the same estimator. Two distinctions should be kept separate. First, one may use a variance conditional on the observed stratum composition or an unconditional variance that also averages over random stratum composition. Second, one may estimate the variance under the null hypothesis or under the unrestricted model. The classical CMH test uses a conditional null-based variance, whereas Wald-type inference for AIPW estimators usually uses an unrestricted variance, often in its unconditional superpopulation form.

In the binary case, the null-based pooled variance is generally larger than the unrestricted plug-in variance away from the null. For example, for balanced randomization q=1/2q = 1/2, the large-sample null-based variance conditional on nkn_k exceeds the unrestricted conditional variance by

1n2∑k=1Knk(p1k−p0k)2.\frac{1}{n^2}\sum_{k=1}^{K} n_k(p_{1k}-p_{0k})^2.

Thus, null-based variance estimation may reduce the value of the test statistic under alternatives. This suggests a potential power advantage for tests based on the unrestricted plug-in variance estimator. In practice, however, that advantage is often tempered by the estimator’s poor finite-sample behavior (see also § 6). In small or moderately sized samples, with many strata, or when some stratum-by-treatment cells are sparse or have response probabilities close to 0 or 1, the factors pjk(1−pjk)p_{jk}(1-p_{jk}) become too small and hence tend to underestimate the corresponding variance components. Moreover, the estimated between-stratum component in the unconditional variance is unreliable when it is based on few strata. The resulting Wald tests will therefore be anticonservative in many cases. Null-based or pooled variance estimators are often preferred for testing in comparative binomial problems precisely because they are more stable in such settings, even though they are larger than the unrestricted plug-in variance away from the null; see, for example, [1990], [2003], and [2013].

Consequences for testing

§ 3 clarifies the role of conditioning in tests based on Δ^\widehat{\Delta}. If inference is carried out conditionally on the observed stratum sizes, variation due to random stratum composition is removed. In the unrestricted variance decomposition, the difference between the unconditional variance and the variance conditional on nkn_k is 1nVar⁡ψ(D)\frac{1}{n}\operatorname{Var}_{\psi}(D). This term vanishes only if the stratum-specific risk differences are all equal. Thus, conditional inference removes a source of variation that is unrelated to the treatment comparison within the realized stratum composition of the trial. For hypothesis testing, this conditional perspective has a natural appeal. If a test has a conditional type I error of at most α\alpha for every value of the conditioning statistic, then it also has unconditional type I error of at most α\alpha, since

PH0(reject)=EH0{PH0(reject∣conditioning statistic)}≤α.P_{H_0}(\text{reject}) = E_{H_0}\{P_{H_0}(\text{reject} \mid\text{conditioning statistic})\} \leq\alpha.

Thus, conditioning on the observed stratum composition does not compromise type I error control under the strong null hypothesis δk=0\delta_k = 0 for all kk. Rather, it eliminates from the test statistic the extra variation due to random stratum sizes. This is particularly attractive in randomized clinical trials, where the stratum composition is observed before the outcome analysis and the primary comparison is between randomized treatment groups within the realized trial population.

This argument is distinct from the question whether the variance is estimated under the null or under the unrestricted model. The classical CMH statistic combines both features: it conditions on the observed nkn_k and r⋅kr_{\cdot k}, and it uses a null-based pooled variance. An unrestricted AIPW Wald test, in contrast, typically uses an unrestricted variance estimator and may also use an unconditional superpopulation variance. A direct comparison between the two therefore mixes two effects: conditioning tends to remove variation from random stratum composition, whereas null-based pooling can increase the denominator under alternatives. At q=1/2q = 1/2, these two effects almost cancel: the null-based pooled variance exceeds the unrestricted conditional variance by 1n∑kψkδk2=1n{Var⁡ψ(D)+Δ2}\frac{1}{n}\sum_k \psi_k\delta_k^2 = \frac{1}{n}\{\operatorname{Var}_{\psi}(D) + \Delta^2\}, whereas the unconditional variance exceeds it by 1nVar⁡ψ(D)\frac{1}{n}\operatorname{Var}_{\psi}(D). The CMH denominator is therefore larger by only Δ2/n\Delta^2/n, which is of second order under local alternatives. The simulations in § 6 are in line with these theoretical expectations.

Consequently, the main point is not that the CMH test must have uniformly higher power than an unrestricted AIPW Wald test. Under strict Pitman local alternatives the differences discussed above are of second order, and under fixed alternatives both tests are consistent. Rather, the point is that the CMH test is a valid test based on the same stratified ATE estimator, without requiring the common-odds-ratio model often used to motivate it. It controls the type I error under the strong null hypothesis for any allocation ratio and, as shown in § 5, under the weak null hypothesis Δ=0\Delta= 0 when allocation is 1:1.

Asymptotic type I error for different versions of null hypotheses

First, consider the one-sided CMH test (comparing the root of the test statistic, signed by Δ^\widehat{\Delta}, with the corresponding N^(0,1)\widehat{N}(0,1)-quantile) as an asymptotic level-α\alpha test of the strong null hypothesis δk=0\delta_k = 0 for all kk, conditionally on the observed stratum sizes and hence, by the argument of § 4, also unconditionally. It can be re-interpreted as a test of the composite null hypothesis “no benefit in any stratum”,

H0:δk≤0 for all k,H_0 : \delta_k \le0 \text{ for all } k,

against the restricted alternative “no harm in any stratum and benefit in at least one stratum”,

HA:δk≥0 for all k, with strict inequality for at least one k.H_A : \delta_k \ge0 \text{ for all } k, \text{ with strict inequality for at least one } k.

Within this H0H_0, δk=0\delta_k = 0 for all kk is the least favourable configuration: there the rejection probability converges to α\alpha, while at every other point some δk<0\delta_k < 0, hence Δ<0\Delta< 0, and the rejection probability converges to 0. The one-sided CMH test is therefore an asymptotic level-α\alpha test of this pair of hypotheses for any allocation ratio qq.

This interpretation excludes configurations with benefit in some strata and harm in others, in which effects of opposite sign can cancel such that Δ=0\Delta= 0. This motivates the weak null hypothesis

H0:Δ=∑k=1Kψkδk=0.H_0 : \Delta= \sum_{k=1}^{K} \psi_k\delta_k = 0.

Under this weak null, the conditioning argument of § 4 is no longer available: given the realized stratum sizes, ∑knkδk=∑k(nk−nψk)δk\sum_k n_k\delta_k = \sum_k(n_k-n\psi_k)\delta_k is in general not zero. We therefore derive the unconditional asymptotic distribution of the CMH statistic, treating (n1,…,nK)(n_1,\ldots,n_K) as multinomial.

Let

Tn:=∑k=1Knk(p1k−p0k)=nΔ^,vjk:=πjk(1−πjk).T_n := \sum_{k=1}^{K} n_k(p_{1k}-p_{0k}) = n\widehat{\Delta}, \qquad v_{jk} := \pi_{jk}(1-\pi_{jk}).

By equation (5), under the weak null, where Var⁡ψ(D)=∑kψkδk2\operatorname{Var}_{\psi}(D) = \sum_k \psi_k\delta_k^2,

Tnn→dN(0,σ2),σ2=∑k=1Kψk[v1kq+v0k1−q]+∑k=1Kψkδk2.\frac{T_n}{\sqrt{n}} \xrightarrow{d} N(0,\sigma^2), \qquad\sigma^2 = \sum_{k=1}^{K}\psi_k\left[\frac{v_{1k}}{q}+\frac{v_{0k}}{1-q}\right] + \sum_{k=1}^{K}\psi_k\delta_k^2.

For the denominator of the CMH statistic, p⋅k→πˉk:=qπ1k+(1−q)π0kp_{\cdot k} \to\bar{\pi}_k := q\pi_{1k}+(1-q)\pi_{0k} in probability, and

1n∑k=1Knkp⋅k(1−p⋅k)→p∑k=1Kψkπˉk(1−πˉk)=∑k=1Kψk[qv1k+(1−q)v0k]+q(1−q)∑k=1Kψkδk2,\frac{1}{n}\sum_{k=1}^{K}n_kp_{\cdot k}(1-p_{\cdot k}) \xrightarrow{p} \sum_{k=1}^{K}\psi_k\bar{\pi}_k(1-\bar{\pi}_k) = \sum_{k=1}^{K}\psi_k\left[qv_{1k}+(1-q)v_{0k}\right]+q(1-q)\sum_{k=1}^{K}\psi_k\delta_k^2,

where we used the identity πˉk(1−πˉk)=qv1k+(1−q)v0k+q(1−q)δk2\bar{\pi}_k(1-\bar{\pi}_k)=qv_{1k}+(1-q)v_{0k}+q(1-q)\delta_k^2. The same limit applies to the finite-sample version in equation (1) with the factors nk/(nk−1)n_k/(n_k-1). Hence, using n1k=qnkn_{1k}=qn_k,

XCMH2=q(1−q)Tn2/n[∑k=1Knkp⋅k(1−p⋅k)]/n→dc⋅χ12,X_{\mathrm{CMH}}^2 = \frac{q(1-q)T_n^2/n}{\left[\sum_{k=1}^{K}n_kp_{\cdot k}(1-p_{\cdot k})\right]/n} \xrightarrow{d} c\cdot\chi_1^2,

with

c=∑k=1Kψk[(1−q)v1k+qv0k]+q(1−q)∑k=1Kψkδk2∑k=1Kψk[qv1k+(1−q)v0k]+q(1−q)∑k=1Kψkδk2.(6)c = \frac{\sum_{k=1}^{K}\psi_k\left[(1-q)v_{1k}+qv_{0k}\right]+q(1-q)\sum_{k=1}^{K}\psi_k\delta_k^2}{\sum_{k=1}^{K}\psi_k\left[qv_{1k}+(1-q)v_{0k}\right]+q(1-q)\sum_{k=1}^{K}\psi_k\delta_k^2}. \tag*{(6)}

Numerator and denominator differ only by

(1−2q)∑k=1Kψk(v1k−v0k).(1-2q)\sum_{k=1}^{K}\psi_k(v_{1k}-v_{0k}).

Two conclusions follow immediately:

  1. Under balanced allocation q=12q = \frac{1}{2}, c=1c = 1 for every configuration of πjk\pi_{jk} satisfying the weak null. The CMH test is therefore an asymptotically exact level-α\alpha test of the weak null hypothesis Δ=0\Delta= 0. The null-based pooled variance in its denominator exceeds the within-stratum variance by exactly the amount of between-stratum variation 14∑kψkδk2\frac{1}{4}\sum_k \psi_k\delta_k^2 that the random stratum composition adds to the variance of Δ^\widehat{\Delta}.

  1. Under unequal allocation q≠12q \ne\frac{1}{2}, c≠1c \ne1 in general. The test is liberal (c>1c > 1) if (1−2q)∑kψk(v1k−v0k)>0(1 - 2q)\sum_k \psi_k(v_{1k} - v_{0k}) > 0, i.e. if the larger treatment arm has, on average, the smaller binomial variance, and conservative otherwise.

This parallels the classical result that pooled-variance two-sample tests are robust to variance heterogeneity only under equal allocation [13]; see also Bugni et al. [2018] for an analogous result under covariate-adaptive randomization.

If the nominal critical value is χ1,1−α2\chi^2_{1,1-\alpha}, the asymptotic rejection probability is

P(XCMH2>χ1,1−α2)→P(cχ12>χ1,1−α2)=2[1−Φ(χ1,1−α2/c)].P(X^2_{\mathrm{CMH}} > \chi^2_{1,1-\alpha}) \to P(c\chi^2_1 > \chi^2_{1,1-\alpha}) = 2\left[1 - \Phi\left(\sqrt{\chi^2_{1,1-\alpha}/c}\right)\right].

To illustrate the magnitude of deviations from nominal α\alpha in extreme cases, consider K=4K = 4 strata with ψk=0.25\psi_k = 0.25, π0k=0.3\pi_{0k} = 0.3 for all kk, π11=π13=0.55\pi_{11} = \pi_{13} = 0.55 and π12=π14=0.05\pi_{12} = \pi_{14} = 0.05, such that Δ=0\Delta= 0 with δk=±0.25\delta_k = \pm0.25. At α=0.05\alpha= 0.05, the asymptotic rejection probability is 5% for q=0.5q = 0.5, about 2.5% for q=0.1q = 0.1 and about 8.7% for q=0.9q = 0.9. For practically more relevant, less extreme settings, the finite-sample accuracy of the asymptotic rejection probabilities is examined in § 6.

Simulation

Design

We compare the CMH test with the Wald test based on the same estimator Δ^\widehat{\Delta} in trials with n=100n = 100 or n=200n = 200 patients, K=4K = 4 or K=8K = 8 strata, and allocation 1:1 (q=1/2q = 1/2) or 2:1 (q=2/3q = 2/3). The stratum probabilities and control response rates are

K=4:ψ=(0.40,0.30,0.20,0.10),π0⋅=(0.30,0.40,0.20,0.50),K=8:ψ=(0.25,0.20,0.15,0.12,0.10,0.08,0.06,0.04),π0⋅=(0.30,0.40,0.20,0.50,0.35,0.25,0.45,0.15).\begin{aligned} K = 4:\quad&\psi= (0.40, 0.30, 0.20, 0.10),\\ &\pi_{0\cdot} = (0.30, 0.40, 0.20, 0.50),\\ K = 8:\quad&\psi= (0.25, 0.20, 0.15, 0.12, 0.10, 0.08, 0.06, 0.04),\\ &\pi_{0\cdot} = (0.30, 0.40, 0.20, 0.50, 0.35, 0.25, 0.45, 0.15). \end{aligned}

The unequal ψk\psi_k were chosen such that some strata are small, in particular for K=8K = 8 and n=100n = 100, where the smallest stratum has an expected size of 4 patients.

The response probabilities in the treatment arm are π1k=π0k+δk\pi_{1k} = \pi_{0k} + \delta_k where δk\delta_k is determined as follows:

  • Strong null: δk=0\delta_k = 0 for all kk.

  • Weak null: δk=0.12sk\delta_k = 0.12s_k with sk=(−1)k+1−∑ℓψℓ(−1)ℓ+1s_k = (-1)^{k+1} - \sum_{\ell}\psi_{\ell}(-1)^{\ell+1}. Hence, sks_k alternates in sign and is shifted such that ∑kψksk=0\sum_k \psi_k s_k = 0. For K=4K = 4, ψ=(0.40,0.30,0.20,0.10)\psi= (0.40, 0.30, 0.20, 0.10) this gives δk=0.096,−0.144,0.096,−0.144\delta_k = 0.096, -0.144, 0.096, -0.144, respectively.

  • Power, homogeneous: δk=0.18\delta_k = 0.18 for all kk.

  • Power, heterogeneous: δk=0.18+0.12sk\delta_k = 0.18 + 0.12s_k with the same sks_k as for the weak null.

The effect Δ=0.18\Delta= 0.18 gives a power of about 75% for n=200n = 200 and 1:1 allocation. In each simulated trial, the stratum sizes n1,…,nKn_1,\ldots,n_K were drawn from the multinomial distribution, the treatment arm in stratum kk received n1k=round⁡(qnk)n_{1k} = \operatorname{round}(qn_k) patients, mimicking stratified block randomization, and the numbers of responders were drawn from the binomial distributions. No restrictions are imposed, so that empty strata and strata in which one arm is empty (in particular strata with a single patient) occur. There were 100,000 replications per setting. The Monte Carlo standard error of a rejection rate is about 0.05 percentage points at 2.5% and about 0.16 percentage points at 50%.

The CMH test uses statistic (1) without continuity correction. The Wald test uses Δ^/V^1/2\widehat{\Delta}/\widehat{V}^{1/2} with the plug-in version of the unconditional variance (5),

V^=1n∑k=1Knkn[p1k(1−p1k)q+p0k(1−p0k)1−q]+1n[∑k=1Knkn(p1k−p0k)2−Δ^ 2].\widehat{V} = \frac{1}{n}\sum_{k=1}^{K}\frac{n_k}{n}\left[\frac{p_{1k}(1-p_{1k})}{q}+\frac{p_{0k}(1-p_{0k})}{1-q}\right]+\frac{1}{n}\left[\sum_{k=1}^{K}\frac{n_k}{n}(p_{1k}-p_{0k})^2-\widehat{\Delta}^{\,2}\right].

Both tests are carried out one-sided at the nominal level of 2.5%, as usual for superiority trials: for the CMH test, the signed root sign⁡(Δ^)(XCMH2)1/2\operatorname{sign}(\widehat{\Delta})(X^2_{\mathrm{CMH}})^{1/2}, and for the Wald test Δ^/V^1/2\widehat{\Delta}/\widehat{V}^{1/2}, is compared with z0.975=1.96z_{0.975} = 1.96.

To separate the power of the two tests from their size, we also report size-adjusted power: for each combination of KK, nn and qq, the empirical 97.5% quantile of each signed statistic in the strong-null scenario was used as critical value in the two power scenarios. This is a benchmark for a fair power comparison only. It is not a practical remedy for the liberality of the Wald test, since the critical value depends on the unknown ψk\psi_k and πjk\pi_{jk} and, under the weak null, on the unknown configuration of the δk\delta_k. To check that the results do not depend on control proportions being mostly below 0.5, we repeated all settings with mirrored proportions, π0k→1−π1k\pi_{0k} \to1-\pi_{1k} and π1k→1−π0k\pi_{1k} \to1-\pi_{0k}, which leaves all δk\delta_k unchanged.

Empty strata and empty arms. A stratum in which one arm is empty contributes nothing to the CMH statistic: its weight n1kn0k/nkn_{1k}n_{0k}/n_k in the numerator and its contribution to the variance are both zero. In our implementation such strata are simply omitted, which leaves the statistic unchanged. For the Wald test, in contrast, no estimate p1k−p0kp_{1k}-p_{0k} is available for such a stratum. We dropped these strata and rescaled the weights nk/nn_k/n of the remaining strata to sum to 1. Strictly speaking, this changes the estimand to the average treatment effect over the strata in which both arms are observed, which is somewhat awkward, since a stratum is then excluded merely because it happened to be represented by too few patients. Empty strata (nk=0n_k = 0) receive weight 0 in both tests and are irrelevant. With n=100n = 100 and K=8K = 8, about 10% of the simulated trials contain at least one empty stratum or a stratum with an empty arm (Table 1, column Drop.). Otherwise, this is rare.

KKnnAlloc.ScenarioAs.Nominal CMHNominal WaldSize-adj. CMHSize-adj. WaldCrit. values CMHCrit. values WaldDrop.
41001:1strong null2.502.422.94——1.952.030.03
weak null2.502.462.93——0.04
power, hom.—46.548.747.046.90.04
power, het.—45.847.746.446.20.04
41002:1strong null2.502.363.73——1.942.160.03
weak null2.462.303.63——0.03
power, hom.—41.146.542.139.50.03
power, het.—40.045.841.238.70.04
42001:1strong null2.502.622.87——1.982.020.00
weak null2.502.402.69——0.00
power, hom.—75.376.174.874.80.00
power, het.—74.775.273.873.80.00
42002:1strong null2.502.393.12——1.942.070.00
weak null2.462.313.10——0.00
power, hom.—69.672.170.268.50.00
power, het.—68.471.469.367.80.00
81001:1strong null2.502.483.26——1.952.0810.4
weak null2.502.483.19——10.4
power, hom.—45.950.646.246.110.3
power, het.—45.750.346.045.710.5
81002:1strong null2.502.314.00——1.932.2110.5
weak null2.552.414.03——10.5
power, hom.—41.248.942.540.210.4
power, het.—41.348.442.539.810.4
82001:1strong null2.502.582.94——1.972.030.28
weak null2.502.452.79——0.25
power, hom.—75.577.275.175.10.26
power, het.—75.377.074.974.80.27
82002:1strong null2.502.403.33——1.942.100.30
weak null2.552.463.29——0.26
power, hom.—70.273.670.769.20.31
power, het.—69.873.070.468.60.27

Table 1. Simulated one-sided rejection rates (%, upper tail, nominal level 2.5%) of the CMH test and the Wald test for the stratified ATE estimator; 100,000 replications per setting. Alloc.: allocation ratio treatment:control. As.: asymptotic one-sided rejection rate of the CMH test from Section 6. Nominal: rejection rates with the critical value z0.975=1.96z_{0.975} = 1.96. Size-adj.: power with the critical values in the columns Crit. values, i.e. the empirical 97.5% quantiles of the signed statistics under the strong null for the same KK, nn and allocation. Drop.: percentage of trials with at least one empty stratum or one stratum with an empty arm.

Results

The results are shown in Table 1. The table contains the upper-tail rates for the original settings only. Lower-tail rates and the results for the mirrored settings reported in the text are given in the Supplementary Material.

Type I error. The CMH test keeps the one-sided nominal level of 2.5% well in all settings, with rejection rates between 2.30% and 2.62%, under both the strong and the weak null hypothesis, even for K=8K = 8 and n=100n = 100 with strata of only a few patients. This confirms the well-known observation that the asymptotic CMH test does not require large strata, but only a sufficiently large total sample size; see, for example, Mantel and Fleiss [1980]. The Wald test is liberal in all settings, with rejection rates between 2.69% and 4.03%. The excess is largest with more strata, smaller samples and unequal allocation, i.e. when stratum-by-treatment cells are small, and it decreases with increasing nn. This is in line with the arguments at the end of § 3: the factors pjk(1−pjk)p_{jk}(1-p_{jk}) in small cells tend to underestimate the corresponding variance components.

Asymmetry under unequal allocation. Under 1:1 allocation, the rejection rates of both tests in the upper and the lower tail are practically equal. Under 2:1 allocation, the Wald test is clearly more liberal in the upper tail, which is the relevant one for superiority testing (3.10–4.03%), than in the lower tail (2.49–3.25%). The reason is that the smaller control arm dominates the variance, with weight 1/(1−q)=31/(1-q) = 3 against 1/q=1.51/q = 1.5 for the treatment arm. Since most π0k\pi_{0k} are below 0.5, a control proportion p0kp_{0k} that happens to be low increases Δ\Delta and at the same time decreases p^0k(1−p^0k)\hat{p}_{0k}(1-\hat{p}_{0k}) and hence V^\hat{V}. Large positive values of the Wald statistic are therefore inflated, while negative values are not. Under 1:1 allocation, the two arms contribute symmetrically and this effect largely cancels. The CMH test, whose pooled variance does not depend on the arm-specific proportions, shows only a slight asymmetry in the opposite, conservative direction (upper tail 2.30–2.46%, lower tail 2.48–2.73% under 2:1 allocation). In the mirrored settings, both asymmetries are reversed: for the Wald test, upper tail 2.54–3.28% and lower tail 3.07–4.01%; for the CMH test, upper tail 2.49–2.67% and lower tail 2.26–2.44%.

Weak null hypothesis. The simulated rejection rates of the CMH test under the weak null agree with the asymptotic rates obtained from equation (6) for the same settings (column As.). For 1:1 allocation, the asymptotic rate is exactly 2.5%. The simulated rates are 2.40–2.48%. For 2:1 allocation, the asymptotic rates are 2.46% (K=4K = 4) and 2.55% (K=8K = 8), and the simulated rates are 2.30–2.46%, reflecting in addition the slight conservativeness of the upper tail noted next. above. With the moderate heterogeneity used here, the deviation of cc from 1 is small. The example at the end of § 5 shows that it can be considerably larger for stronger heterogeneity and more extreme allocation.

Power. With nominal critical values, the Wald test has higher power than the CMH test, by up to 7.7 percentage points (K=8K = 8, n=100n = 100, 2:1). This difference is due to the inflated type I error of the Wald test. After size adjustment, the power of the two tests is practically identical under 1:1 allocation (differences of at most 0.3 percentage points), and the CMH test is ahead by 1.5 to 2.7 percentage points (if the CMH test critical value is adjusted downwards) or 0.6 to 1.6 percentage points (if the nominal level is used for CMH) under 2:1 allocation. The result for 1:1 allocation agrees with § 4: the null-based pooled variance of the CMH test exceeds the unconditional variance used by the Wald test by only Δ2/n\Delta^2/n, which is negligible here. Under unequal allocation, the pooled variance in addition weights the arm-specific binomial variances v1kv_{1k} and v0kv_{0k} with qq and 1−q1-q instead of 1−q1-q and qq, which asymptotically gives the Wald test a slight advantage in our power settings, where the larger treatment arm mostly has the larger binomial variance. In finite samples, this is outweighed by the upward skewness of the Wald statistic, which requires a considerably larger size-adjusted critical value (2.07–2.21 instead of 1.96). The potential power advantage of estimating the variance without restriction, discussed in § 3, is therefore small in these settings, and its sign depends on the configuration: in the mirrored settings, the size-adjusted power under 2:1 allocation is slightly higher for the Wald test (by 0.5 to 1.0 percentage points). Hence, neither test has a consistent power advantage. The robust difference between the two tests is the type I error.

Heterogeneity. Heterogeneous treatment effects reduce the power of both tests by at most about one percentage point compared with homogeneous effects of the same Δ\Delta. This reflects the additional variance term 1nVar⁡ψ(D)\frac{1}{n}\operatorname{Var}_{\psi}(D), which is small compared with the within-stratum variance for the heterogeneity considered here.

Two-sided testing. For two-sided tests at the 5% level (not shown in detail), the CMH test again keeps the level (4.79–5.19%), and the Wald test is liberal (5.36–7.24%). Since a two-sided test counts both tails, the asymmetry of the Wald test is partly hidden: its two-sided rate overstates the lower-tail error and understates the upper-tail error. Accordingly, two-sided size adjustment does not fully correct the upper tail, and the Wald test then even appears slightly more powerful under 2:1 allocation (by 0.2–1.1 percentage points). For one-sided superiority testing, this comparison is misleading.

In summary, the CMH test controls the type I error in all settings studied, without relevant loss of power, in line with § 4 and § 5.

Discussion

In this note, we showed that the Cochran–Mantel–Haenszel test for the stratified comparison of a binary response to two treatments can be viewed as a test of the causal ATE in a study with covariate adjustment for one or several categorical covariates for which stratified randomization is feasible. If more than one such covariate exists, they can be combined into a single one by taking the product of their categories. We further showed that the CMH test statistic can be interpreted as a standardized version of an estimate of the ATE that is unbiased by randomization alone and coincides with the AIPW estimate, irrespective of the outcome model used.

Regarding variance estimation and the closely related power of corresponding tests, we showed that the CMH test

  1. preserves the type I error under a strong null hypothesis of no treatment effect in any stratum, either asymptotically or exactly when the exact conditional version is used,

  1. is an asymptotically exact test of the weak null hypothesis of zero average treatment effect in the practically important case of equal randomization to the two treatments, irrespective of how the treatment effect varies across strata. Under unequal randomization, it can be liberal or conservative, although in the realistic settings of § 6 the deviation from the nominal level is small.

Of these observations, the first has long been well known. Nevertheless, it is useful to recall that the CMH test is valid under substantially weaker assumptions than suggested by the common textbook presentation as a test of a common odds ratio in a logistic regression model without treatment-by-stratum interaction.

The second statement about the weak null hypothesis arises because, under equal allocation, the null-based pooled variance in the CMH denominator automatically includes the between-stratum variation of the treatment effect, so that no separate estimate of that component is needed.

The comparison with AIPW also highlights an important practical distinction between point estimation and testing. Modern covariate-adjusted estimators, including AIPW-type estimators proposed for randomized trials target marginal treatment effects and can improve the precision of point estimation relative to unadjusted estimators. However, the large-sample variance theory underlying these methods is often fragile in finite samples. When the number of strata is large relative to the sample size, or when there is substantial heterogeneity across strata, some stratum-by-treatment cells will be small or have observed response proportions close to 0 or 1. The unrestricted plug-in variance then becomes unstable and will usually underestimate the true variability, leading to liberal Wald-type tests.,

This issue is distinct from the causal interpretation of the point estimator. Under stratified randomization, the CMH statistic and the AIPW Wald statistic share the same numerator Δ^\widehat{\Delta}, and under equal allocation and the weak null hypothesis their variance estimates also converge to the same limit, the true variance of Δ^\widehat{\Delta}. The remaining difference is that between a score-type and a Wald-type test of the same parameter: the CMH test estimates the variance under the null, pooling treatment arms within strata, whereas the AIPW Wald test estimates it without restriction, cell by cell, and must in addition estimate the between-stratum variation of the treatment effect from the KK observed strata. The two tests therefore have the same first-order asymptotic properties but can behave noticeably differently in finite samples with sparse cells or response proportions near 0 or 1. For hypothesis testing, it is therefore the choice of variance estimator, not of the point estimator, that matters, and asymptotic equivalence does not guarantee comparable type I error control in finite samples. The simulations in § 6 illustrate this. The CMH test keeps the nominal level in all settings and in both tails, whereas the Wald test is liberal throughout. Under unequal allocation, the excess type I error of the Wald test is concentrated in one tail, depending on whether the control proportions are mostly below or above 0.5. A two-sided analysis partly hides this. The power advantage of the Wald test at nominal critical values is due to its inflated type I error. After size adjustment, neither test has a consistent power advantage. Hence, in the settings studied, the CMH test gives up no relevant power in exchange for reliable type I error control.

The finite-sample behavior of the Wald test can be improved in various ways, for example by small-sample corrections of the variance estimator and the degrees of freedom [3], by adding pseudo-observations to sparse cells [2], by bootstrapping, or by calibrating the critical value under the null hypothesis. A systematic comparison of such variants is beyond the scope of this note. We note, however, that these corrections add choices that must be prespecified and in general control the type I error only approximately. With sparse cells, bootstrap resamples suffer from the same empty arms and boundary proportions as the original data. Calibration under the strong null hypothesis by permuting treatment labels within strata, keeping the stratum sizes and the response totals fixed, leads to the exact conditional distribution of Δ^\widehat{\Delta}, i.e. to the exact CMH test. In this sense, the CMH test is itself the natural stabilized version of a test based on Δ^\widehat{\Delta}, and it is available in closed form in all standard software.

Which null hypothesis does the CMH test actually test? Under equal allocation, it is a valid test of the weak null hypothesis Δ=0\Delta= 0, without any restriction on how the treatment effect varies across strata. For any allocation ratio, the one-sided test is also a valid test of “no benefit in any stratum” against “no harm in any stratum and benefit in at least one stratum”. Such restricted alternatives may appear awkward and can have undesirable properties [14]. However, the weak null of zero average treatment effect is not necessarily the clinically more relevant hypothesis. In clinical trials, strata are very rarely a random sample from a well-defined super-population. Their composition reflects design choices, geography, eligibility criteria, and patterns of participation. If stratum-specific effects differ in sign, Δ=0\Delta= 0 merely states that benefit and harm cancel for this particular stratum composition, not that the treatment is without effect. In such a situation, neither a test of the weak null nor a test against the restricted alternative answers a relevant clinical question. The heterogeneity itself would have to be addressed.

Overall, the main contribution of this note is to clarify that the CMH test can be understood not only through the traditional common-odds-ratio framework, but also as a test of the average treatment effect based on an estimator that is unbiased by randomization alone. This perspective connects a classical stratified analysis tool with modern causal inference. It also clarifies a practically important point: in stratified randomized trials with binary endpoints, the asymptotic elegance of unrestricted AIPW inference does not eliminate finite-sample concerns arising from sparsity, boundary estimates, and treatment-effect heterogeneity across strata. In such settings, the conditional nature and pooled variance structure of the CMH test can remain attractive for testing, even when AIPW methods are preferred for point estimation or for other estimands.

Acknowledgements

I thank my colleagues Dominic Magirr and Lillian Yau for helpful discussions about the topic. AI tools, including ChatGPT and Claude Opus, were used during the preparation of this manuscript to identify relevant literature, to suggest and check derivations and arguments, to write R code for implementation and simulation, to draft preliminary text, and for stylistic revision. All suggestions were checked by the author. The conceptual framing, final selection of arguments, interpretation of results, and responsibility for the final manuscript remain with the author.

References

  1. [2]Alan Agresti and Brian Caffo. Simple and effective confidence intervals for proportions and differences of proportions result from adding two successes and two failures. The American Statistician, 54(4):280–288, 2000.DOI
  2. [3]Robert M. Bell and Daniel F. McCaffrey. Bias reduction in standard errors for linear regression with multi-stage samples. Survey Methodology, 28(2):169–181, 2002.
  3. [7]Miguel A. Hernán and James M. Robins. Causal Inference: What If. Chapman and Hall CRC, Boca Raton, 2020. ISBN 9781420076165.
  4. [9]Nathan Mantel and William Haenszel. Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22(4):719–748, 1959.
  5. [10]Luke W. Miratrix, Jasjeet S. Sekhon, and Bin Yu. Adjusting treatment effect estimates by post-stratification in randomized experiments. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 75(2):369–396, 2013. doi: 10.1111/j.1467-9868.2012.01048.x.DOI
  6. [11]Paul R. Rosenbaum. Model-based direct adjustment. Journal of the American Statistical Association, 82(398):387–394, 1987. doi: 10.1080/01621459.1987.10478441.DOI
  7. [12]Carl-Erik Särndal, Bengt Swensson, and Jan Wretman. Model Assisted Survey Sampling. Springer, New York, 1992. ISBN 9780387975283.
  8. [13]Henry Scheffé. Practical solutions of the Behrens–Fisher problem. Journal of the American Statistical Association, 65(332):1501–1508, 1970. doi: 10.1080/01621459.1970.10481179.DOI
  9. [14]Mervyn J. Silvapulle and Pranab Kumar Sen. Constrained Statistical Inference: Order, Inequality, and Shape Constraints. Wiley, Hoboken, NJ, 2005. ISBN 9780471208273.
  10. [15]Anastasios A. Tsiatis. Semiparametric Theory and Missing Data. Springer Series in Statistics. Springer, New York, 2006. ISBN 9780387324487.
  11. [16]Ting Ye, Jun Shao, Yanyao Yi, and Qingyuan Zhao. Toward better practice of covariate adjustment in analyzing randomized clinical trials. Journal of the American Statistical Association, 2022. doi: 10.1080/01621459.2022.2049278.DOI
  12. [17]Ting Ye, Marlena Bannick, Yanyao Yi, and Jun Shao. Robust variance estimation for covariate-adjusted unconditional treatment effect in randomized clinical trials with binary outcomes. Statistical Theory and Related Fields, 7(2):159–163, 2023. doi: 10.1080/24754269.2023.2205802.DOI

Paper details

vlnc:W_8hk7ww69
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

ChatGPT, Claude Opus (multiple versions)

View statement
Looking for related papers…
Contents