Tutorials › Statistical Genetics › Combining Stratum-Specific Tests for Association

Population Stratification Control · Tutorial 188 of 989

Combining Stratum-Specific Tests for Association

Construct and interpret the Cochran–Mantel–Haenszel test for stratified case-control data, while checking whether a single summary association is appropriate.

Intermediate 10 min read

What You'll Learn

  • Organize stratified case-control observations into 2-by-2 tables.
  • Calculate the expected exposed-case count and its variance within each stratum.
  • Combine stratum-specific departures from the null in the CMH statistic.
  • Interpret the asymptotic chi-square test and its conditional null hypothesis.
  • Estimate a common odds ratio and state when that summary is defensible.
  • Recognize effect heterogeneity, sparse data, and uninformative strata.

Why Combine Evidence Across Strata?

An association between a genetic marker and case status can differ across ancestry groups simply because the groups have different marker frequencies. Comparing cases and controls within ancestry strata helps control that source of confounding. The next question is how to summarize the within-stratum evidence: a single test can combine it, provided the summary is interpreted with care.

The Cochran–Mantel–Haenszel (CMH) test is a standard method for testing conditional association across a set of stratified 2-by-2 tables. It compares the observed number of exposed cases in each stratum with the number expected if exposure and case status were independent within that stratum. The test combines these departures while accounting for the stratum-specific margins.

Definition: For stratum \(k\), let \(a_k\) be the number of exposed cases, \(b_k\) unexposed cases, \(c_k\) exposed controls, and \(d_k\) unexposed controls. The table total is \(n_k=a_k+b_k+c_k+d_k\). The case total is \(n_{1k}=a_k+b_k\), the control total is \(n_{0k}=c_k+d_k\), the exposed total is \(n_{+1k}=a_k+c_k\), and the unexposed total is \(n_{+0k}=b_k+d_k\).

“Exposure” here means a binary marker definition chosen for the analysis, such as carrying at least one copy of an allele versus carrying none. The outcome is case status. Each individual contributes to one stratum and one cell. In a genetic analysis, do not treat two alleles from the same person as independent observations unless the analysis explicitly accounts for their dependence.

The CMH Statistic

Under the null hypothesis of no association within stratum \(k\), the expected exposed-case count, conditional on the four table margins, is \(E(a_k)=n_{1k}n_{+1k}/n_k\). Its conditional variance is the hypergeometric variance shown below. The CMH statistic sums the observed-minus-expected counts across strata and scales their squared sum by the sum of their variances.

$$ E(a_k)=\frac{n_{1k}n_{+1k}}{n_k}, \qquad \operatorname{Var}(a_k)= \frac{n_{1k}n_{0k}n_{+1k}n_{+0k}} {n_k^2(n_k-1)}. $$
$$ X^2_{\mathrm{CMH}}= \frac{\left[\sum_{k=1}^{K}(a_k-E(a_k))\right]^2} {\sum_{k=1}^{K}\operatorname{Var}(a_k)}. $$

When the strata provide information and the usual large-sample approximation is adequate, \(X^2_{\mathrm{CMH}}\) is compared with a chi-square distribution with 1 degree of freedom under the null. The null is conditional independence of exposure and case status within every stratum; equivalently, every stratum-specific odds ratio is 1. A small p-value is evidence against that joint null, not the probability that the null is true.

The statistic uses signed departures before squaring their sum. Thus departures in opposite directions can cancel. The test is most naturally read as a test of a common conditional association, rather than as a search for any possible pattern of stratum-specific associations.

Worked CMH Calculations

Worked Example: Combining Two Similar Stratum-Specific Associations

Suppose a hypothetical case-control analysis defines exposure as carrying a particular allele. The two strata are ancestry groups. The counts below are invented for illustration.

StratumCases exposedCases unexposedControls exposedControls unexposed
124162436
21842832

In stratum 1, \(n_1=100\), \(n_{11}=40\), and \(n_{+11}=48\). The expected exposed-case count is \(40(48)/100=19.2\). Its variance is \(40(60)(48)(52)/[100^2(99)]=6.051\) (to three significant figures), so the observed departure is \(24-19.2=4.8\).

In stratum 2, \(n_2=100\), \(n_{12}=60\), and \(n_{+12}=26\). The expected count is \(60(26)/100=15.6\), and the variance is \(60(40)(26)(74)/[100^2(99)]=4.664\). The departure is \(18-15.6=2.4\).

Combining the two strata gives

$$ X^2_{\mathrm{CMH}}= \frac{(4.8+2.4)^2}{6.051+4.664} =\frac{51.84}{10.715} \approx 4.84. $$

Against a chi-square distribution with 1 degree of freedom, this gives \(p\approx0.0278\). At a 0.05 significance level, the data provide evidence against no association within the strata. This p-value does not establish that the allele causes case status.

Worked Example: A Common Summary Can Hide Opposite Associations

Now consider two hypothetical strata with equal-sized case and control groups, but with associations in opposite directions.

StratumCases exposedCases unexposedControls exposedControls unexposed
A2461218
B6241812

Each stratum has \(n_k=60\). In A, the case total is 30 and the exposed total is 36, so \(E(a_A)=30(36)/60=18\), while the observed count is 24: the departure is \(+6\). In B, the case total is 30 and the exposed total is 24, so \(E(a_B)=30(24)/60=12\), while the observed count is 6: the departure is \(-6\). The departures sum to zero, and therefore \(X^2_{\mathrm{CMH}}=0\), despite the substantial within-stratum differences.

The stratum-specific odds ratios make the pattern clear: \(24(18)/[6(12)]=6\) in A, whereas \(6(12)/[24(18)]=1/6\) in B. A single common-effect summary would conceal these opposing associations. The appropriate conclusion is not that exposure is unrelated to case status in each stratum; rather, the combined signed departures cancel. These stratum-specific results should be reported and investigated separately.

Common-Effect Interpretation and the Mantel–Haenszel Estimate

The CMH test can be paired with a Mantel–Haenszel estimate of a common odds ratio:

$$ \widehat{\mathrm{OR}}_{\mathrm{MH}}= \frac{\sum_{k=1}^{K}a_kd_k/n_k} {\sum_{k=1}^{K}b_kc_k/n_k}. $$

This is a margin-weighted summary of the stratum-specific cross-product odds ratios. It is not generally the same as calculating one odds ratio after pooling all individuals. Its interpretation as one shared conditional odds ratio is most defensible when the stratum-specific effects are reasonably similar in direction and magnitude. The CMH test does not itself prove that the effects are homogeneous; examine the stratum-specific estimates and their uncertainty before presenting a common summary as the substantive result.

For case-control sampling, the odds ratio is the relevant association measure; the sampling design fixes the numbers of cases and controls, so the table does not directly estimate disease risk or prevalence. A conditional association after stratification is also not automatically a causal effect.

Worked Example: A Stratum With No Exposure Variation

Consider two further hypothetical strata. In the second, nobody carries the defined exposure, so that stratum cannot distinguish exposed from unexposed individuals.

StratumCases exposedCases unexposedControls exposedControls unexposed
14426
20404

In stratum 1, \(n_1=16\), the case total is 8, and the exposed total is 6. Thus \(E(a_1)=8(6)/16=3\), and \(\operatorname{Var}(a_1)=8(8)(6)(10)/[16^2(15)]=1\). The observed departure is \(4-3=1\).

In stratum 2, the exposed total is zero. The expected count and variance are both zero, so this stratum contributes neither a departure nor variance to the CMH statistic. Consequently \(X^2_{\mathrm{CMH}}=1^2/1=1.00\), giving an approximate 1-degree-of-freedom p-value of 0.317. The data do not provide evidence against the null at the 0.05 level. This does not show that the null is true; moreover, these small counts make the large-sample approximation questionable, so an exact conditional method may be preferable.

The Mantel–Haenszel estimate here is \([4(6)/16]/[4(2)/16]=3.00\); the second stratum contributes zero to both sums and contains no exposure contrast. This estimate should be treated cautiously because it is based on very little information.

Why the Formula Works

The CMH calculation follows from conditioning on each stratum’s row and column totals. Under conditional independence, the exposed cases are a hypergeometric count: from the \(n_k\) individuals, \(n_{1k}\) are cases and \(n_{+1k}\) are exposed, with the margins held fixed. Its conditional mean and variance are the expressions given above. Across independent strata, the total departure is the sum of the stratum departures, and its variance is the sum of their variances.

Under the null, the standardized sum is approximately standard normal when the strata collectively provide enough information and no small number of sparse strata dominates. Squaring that standardized quantity gives an approximate chi-square statistic with 1 degree of freedom. This explains both why the variances are added and why the statistic has one degree of freedom. When expected counts are sparse, especially across many small tables, the approximation may be inaccurate; an exact conditional test or another suitable method should be considered.

1
Define the table.
Specify binary case status, binary exposure, and the strata. Check that each person is counted once and that the cell definitions are consistent across strata.
2
Check whether a combined effect is meaningful.
Inspect stratum-specific odds ratios and their precision. If directions or magnitudes differ materially, emphasize the separate results rather than relying on one common summary.
3
Compute and interpret the test.
Calculate each expected count and variance, sum the departures and variances, and compare the resulting statistic with the 1-degree-of-freedom chi-square reference distribution when its approximation is reasonable.

Common Mistakes and Practical Interpretation

  • Pooling before controlling for strata. A crude pooled table can mix within-stratum association with differences in exposure frequency and case composition between strata. The CMH test uses within-stratum margins instead.
  • Assuming a small CMH p-value proves a common effect. It tests the joint null of no conditional association, not homogeneity of effects. Report stratum-specific estimates when effect modification is plausible.
  • Reading a non-significant result as proof of no association. A large p-value means the data do not provide sufficient evidence against the null under the test; limited sample size or cancellation can also produce a non-significant result.
  • Interpreting an odds ratio as a risk ratio. In case-control data, case and control sampling does not directly estimate population risks. Keep the interpretation in terms of odds and association.
  • Ignoring empty or sparse cells. A stratum with no exposure variation adds no information about that contrast. Sparse tables can also make the asymptotic p-value unreliable.

The main practical value of the CMH approach is a transparent, stratified test that avoids treating ancestry composition as irrelevant. Its single-number summary is useful when the scientific question and the stratum-specific pattern support a common association. When effects point in different directions or vary substantially, the heterogeneity is itself important evidence, and separate results deserve priority.

Check Your Understanding

Use the definitions and calculations above to answer these questions.

  1. What is the conditional null hypothesis tested by the CMH statistic?
  2. Why are the stratum-specific variances added in the denominator?
  3. If two strata have departures of equal magnitude and opposite signs, what can happen to the CMH statistic, and what should you inspect?
  4. What additional interpretation is required before presenting the Mantel–Haenszel odds ratio as a common effect?
  5. Why does a stratum with no exposed individuals contribute no information to the exposure association?
Clinical Biostats