Stratified Analysis

Assess confounding and effect modification by analysing 2×2 tables across strata of a third variable.

Overview

Stratified analysis is a cornerstone of epidemiological methods. It separates the data into subgroups (strata) defined by a potential confounder and computes stratum-specific and pooled measures of association. This allows you to assess whether a third variable confounds the exposure-outcome relationship (the crude and adjusted estimates differ) or modifies the effect (stratum-specific estimates differ from each other).

Statulator computes stratum-specific OR/RR and chi-square tests, the Mantel–Haenszel (MH) pooled estimate, and homogeneity tests (Woolf and Breslow-Day) to assess whether pooling is appropriate.

Worked Example

Scenario: Confounding by Age in a Drug Study

A study examines whether Drug A reduces infection risk. The crude OR suggests a benefit, but age may confound the relationship (older patients get Drug A more often and are more prone to infection). The data are stratified by age:

Stratum 1 (Age < 60): a=30, b=70, c=20, d=80 → OR = 1.71

Stratum 2 (Age ≥ 60): a=50, b=50, c=35, d=65 → OR = 1.86

Using Statulator:

1 Open the Stratified Analysis calculator.

2 Add two strata and enter the 2×2 table values for each.

3 The calculator produces stratum-specific ORs, the MH pooled OR, homogeneity tests, and the CMH chi-square test.

If the MH pooled OR differs substantially from the crude OR, age is a confounder. If the Breslow-Day test is significant, effect modification is present and you should report stratum-specific estimates rather than a single pooled value.

Interpretation Guide

Confounding: Compare the crude (unstratified) OR/RR to the MH-adjusted estimate. If they differ by more than ~10%, the stratifying variable is likely a confounder.

Effect modification: If the Breslow-Day or Woolf homogeneity test is significant (p < 0.05), stratum-specific estimates differ meaningfully. Report each stratum separately rather than the pooled value.

CMH chi-square: Tests whether the pooled association is statistically significant after controlling for the stratifying variable.

Formula

Mantel–Haenszel Pooled Odds Ratio
\[ \text{OR}_{MH} = \frac{\sum_i \dfrac{a_i d_i}{N_i}}{\sum_i \dfrac{b_i c_i}{N_i}} \]

where \( N_i \) is the total count in stratum \( i \).

Cochran–Mantel–Haenszel Chi-squared
\[ \chi^2_{CMH} = \frac{\left(\sum_i (a_i - E(a_i))\right)^2}{\sum_i \text{Var}(a_i)} \]

with df = 1, where \( E(a_i) = R_{1i}C_{1i}/N_i \) and \( \text{Var}(a_i) = R_{1i}R_{2i}C_{1i}C_{2i}/(N_i^2(N_i-1)) \). Statulator uses the uncorrected form (no −0.5 continuity correction), matching the calculator's output.

Breslow-Day Test for Homogeneity
\[ \chi^2_{BD} = \sum_i \frac{(a_i - \hat{a}_i)^2}{\text{Var}(\hat{a}_i)} \]

where \( \hat{a}_i \) is the expected value of \( a_i \) under the assumption that all strata share a common OR (the MH estimate). df = number of strata − 1.

Woolf’s Test for Homogeneity
\[ Q = \sum_i w_i (\ln\text{OR}_i - \ln\text{OR}_{MH})^2 \quad;\quad w_i = \left(\frac{1}{a_i}+\frac{1}{b_i}+\frac{1}{c_i}+\frac{1}{d_i}\right)^{-1} \]

Assumptions & Requirements

Textbook Examples

Medicine

An epidemiologist assesses the association between oral-contraceptive use and myocardial infarction, stratified by smoking status (smoker / non-smoker).

Stratum 1 (Smokers): OR = 2.8. Stratum 2 (Non-smokers): OR = 3.1.
Result: MH pooled OR = 2.95 (95% CI: 1.9, 4.6); Breslow-Day p = 0.78.
Interpretation: Stratum-specific ORs are homogeneous (p = 0.78). The pooled OR of ~3 indicates a three-fold increase in MI risk with OC use, adjusted for smoking.

Social Science

A criminologist examines whether prior arrest (yes/no) is associated with re-offending (yes/no), stratified by offence type (violent / non-violent).

Stratum 1 (Violent): OR = 1.6. Stratum 2 (Non-violent): OR = 2.4.
Result: MH pooled OR = 2.05; Breslow-Day p = 0.15.
Interpretation: The ORs are reasonably homogeneous. Pooling across offence type, individuals with a prior arrest have about twice the odds of re-offending.

Agriculture

A veterinary study tests whether a feed supplement reduces mastitis (yes/no) in dairy cows, stratified by herd size (small / large).

Stratum 1 (Small herds): OR = 0.45. Stratum 2 (Large herds): OR = 0.50.
Result: MH pooled OR = 0.48 (95% CI: 0.30, 0.76); Breslow-Day p = 0.82.
Interpretation: The supplement roughly halves the odds of mastitis regardless of herd size, with homogeneous effects across strata.

Medicine

Simpson's paradox scenario: a new surgical technique appears worse overall, but is actually better within each age stratum (<60, ≥60). The crude analysis is confounded by age.

Crude OR: 1.4 (technique appears harmful). Stratum <60: OR = 0.6. Stratum ≥60: OR = 0.7.
Result: MH pooled OR = 0.65 (95% CI: 0.45, 0.94); Breslow-Day p = 0.68.
Interpretation: After adjusting for age, the new technique actually reduces adverse outcomes. The crude OR was confounded because older (higher-risk) patients preferentially received the new technique.

References

  1. Mantel, N., & Haenszel, W. (1959). Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22(4), 719–748.
  2. Breslow, N. E., & Day, N. E. (1980). Statistical Methods in Cancer Research. Volume I: The Analysis of Case-Control Studies. IARC Scientific Publications No. 32.
  3. Rothman, K. J., Greenland, S., & Lash, T. L. (2008). Modern Epidemiology (3rd ed.). Lippincott Williams & Wilkins.
  4. Woolf, B. (1955). On estimating the relation between blood group and disease. Annals of Human Genetics, 19(4), 251–253.