Signature
N_1 = a_1 + b_1 + c_1 + d_1; N_2 = a_2 + b_2 + c_2 + d_2; R = a_1 * d_1 / N_1 + a_2 * d_2 / N_2; S = b_1 * c_1 / N_1 + b_2 * c_2 / N_2; E = (a_1 + d_1) * a_1 * d_1 / N_1^2 + (a_2 + d_2) * a_2 * d_2 / N_2^2; F = (a_1 + d_1) * b_1 * c_1 / N_1^2 + (a_2 + d_2) * b_2 * c_2 / N_2^2; G = (b_1 + c_1) * a_1 * d_1 / N_1^2 + (b_2 + c_2) * a_2 * d_2 / N_2^2; H = (b_1 + c_1) * b_1 * c_1 / N_1^2 + (b_2 + c_2) * b_2 * c_2 / N_2^2; OR_MH = R / S; lnOR_MH = log(OR_MH); SE_lnOR = sqrt(0.5 * (E / R^2 + (F + G) / (R * S) + H / S^2)); OR_L = exp(lnOR_MH - 1.96 * SE_lnOR); OR_U = exp(lnOR_MH + 1.96 * SE_lnOR)
| Inputs | Definition | Unit |
|---|---|---|
a_1 | Events in the new treatment arm of trial or stratum 1, at least 0 | count |
b_1 | Non-events in the new treatment arm of trial or stratum 1, at least 0 | count |
c_1 | Events in the comparator arm of trial or stratum 1, at least 0 | count |
d_1 | Non-events in the comparator arm of trial or stratum 1, at least 0 | count |
a_2 | Events in the new treatment arm of trial or stratum 2, at least 0 | count |
b_2 | Non-events in the new treatment arm of trial or stratum 2, at least 0 | count |
c_2 | Events in the comparator arm of trial or stratum 2, at least 0 | count |
d_2 | Non-events in the comparator arm of trial or stratum 2, at least 0 | count |
N_1 | Patients in trial or stratum 1, the four cells added, above 0 | count |
|---|---|---|
N_2 | Patients in trial or stratum 2, the four cells added, above 0 | count |
R | Sum over strata of a d / N; must exceed 0 for the log and the standard error | weighted count |
S | Sum over strata of b c / N, which is also the sum of the odds ratio weights; must exceed 0 | weighted count |
E | Sum over strata of (a + d) a d / N squared | weighted count |
F | Sum over strata of (a + d) b c / N squared | weighted count |
G | Sum over strata of (b + c) a d / N squared | weighted count |
H | Sum over strata of (b + c) b c / N squared | weighted count |
OR_MH | Pooled odds ratio of the new treatment against the comparator, below 1 when the new treatment lowers the odds of the event | ratio, no unit |
lnOR_MH | Natural log of OR_MH, the scale on which the interval is built and on which a probabilistic model would sample it | log odds ratio |
SE_lnOR | Robins, Breslow and Greenland standard error of lnOR_MH | log odds ratio |
OR_L | Lower limit of the 95% confidence interval for OR_MH | ratio, no unit |
OR_U | Upper limit of the 95% confidence interval for OR_MH | ratio, no unit |
Function
Mantel-Haenszel pooling and test of association across stratified two-by-two tables
Maps the cell counts of several two-by-two tables, one per trial or stratum, to a pooled odds ratio, risk ratio or risk difference with its standard error, and to a test of association, while keeping each comparison inside its own stratum. HE-FM-MHM-001 to HE-FM-MHM-003 give the estimators and HE-FM-MHM-004 the Cochran-Mantel-Haenszel statistic, each written out for two strata so that the calculator runs. Their Excel rows take any number of strata, and HE-CF-MHM-001 chains all four for three trials. Another common-effect weighting is the inverse-variance estimate HE-FM-ADMA-001, which HE-FM-PWMA-001 feeds for a risk ratio. The risk difference of one trial is HE-FM-ARR-001 with the sign reversed. Applying a pooled ratio to a baseline probability takes the form of HE-FM-NMA-004 for an odds ratio, written there for a network odds ratio, and is HE-FM-ARR-002 for a risk ratio. Notation follows the Mantel-Haenszel Method article.
Computational function
Computational function for all Mantel-Haenszel results and a model event probability from trial counts
Takes the event counts and arm sizes of the trials in a review, which is what a published forest plot shows, and returns all four Mantel-Haenszel results together with the event probability a decision model needs. The non-events come from the arm sizes, then HE-FM-MHM-001 to HE-FM-MHM-004 run on the same trials, and the pooled odds ratio is applied to a baseline probability in the form of HE-FM-NMA-004, written there for a network odds ratio. Events avoided per 1,000 is 1,000 times HE-FM-ARR-001. The calculator line carries three trials, and the Excel, R and Python versions take any number. Trials with an empty arm are dropped by the code, because they hold no comparison.
Inputs and outputs:
a_iandc_iare events on the new treatment and the comparator in trial i,n1_iandn2_iare the arm sizes, andp_0is the baseline probability of the event over the period of the evidence. The chain returnsN_i,b_i,d_i,R,S,E,F,G,H,OR_MH,lnOR_MH,SE_lnOR,OR_L,OR_U,R_RR,S_RR,P,RR_MH,SE_lnRR,K,RD_MH,J,SE_RD,D_MH,V_MH,chi2_MH, the treated probabilityp_1and the events avoided per 1,000,A_1000.Assumption: As in HE-AS-MHM-001 to HE-AS-MHM-009. Each trial is one stratum, and p_0 relates to the same period as the trials, with HE-AS-NMA-006 for its source and for a treatment effect constant on the log odds scale. A change of cycle length comes after this step.
Worked example (three illustrative trials, one with a zero cell): With
a_1 = 0; n1_1 = 50; c_1 = 4; n2_1 = 50; a_2 = 10; n1_2 = 100; c_2 = 20; n2_2 = 100; a_3 = 30; n1_3 = 200; c_3 = 25; n2_3 = 100; p_0 = 0.25the chain givesR = 11.5; S = 25.1667; OR_MH = 0.457; SE_lnOR = 0.2411; OR_L = 0.2849; OR_U = 0.733; RR_MH = 0.5233; SE_lnRR = 0.2001; RD_MH = -0.0965; SE_RD = 0.0302; D_MH = -13.6667; V_MH = 17.3916; chi2_MH = 10.7395; p_1 = 0.1322; A_1000 = 117.8161. The zero cell of the first trial needs no correction.Worked example (the article's two trials, for reading against the R and Python code):
mh(c(20, 80), c(100, 200), c(30, 50), c(100, 100), 0.25)gives OR 0.6354, L 0.4312, U 0.9363, RR 0.7586, RD -0.1, chi 5.266, p1 0.1748 and avoided 75.2, as in the article. The calculator line needs three trials, so this case runs through HE-EX-MHM-001, HE-EX-MHM-004, HE-EX-MHM-006 and HE-EX-MHM-009.Excel: Use the cells of HE-IM-MHM-001 to HE-IM-MHM-004, with helper columns holding, row by row, the arm size minus the events in TrialNonEventsNew and TrialNonEventsComparator and the two arm sizes added in TrialTotal. With the baseline in BaselineProbability, enter
=PooledOddsRatioMH*BaselineProbability/(1-BaselineProbability+PooledOddsRatioMH*BaselineProbability)in TreatedProbabilityFromOddsRatio and=1000*(BaselineProbability-TreatedProbabilityFromOddsRatio)in EventsAvoidedPerThousand. A trial with an empty arm is left out of the ranges, as the code does, because HE-IM-MHM-003 returns #DIV/0! for it.R:
mh <- function(a, n1, c, n2, p0) { keep <- n1 > 0 & n2 > 0; a <- a[keep]; n1 <- n1[keep]; c <- c[keep]; n2 <- n2[keep]; N <- n1+n2; b <- n1-a; d <- n2-c; R <- sum(a*d/N); S <- sum(b*c/N); E <- sum((a+d)*a*d/N^2); F <- sum((a+d)*b*c/N^2); G <- sum((b+c)*a*d/N^2); H <- sum((b+c)*b*c/N^2); ok <- R > 0 && S > 0; OR <- if (ok) R/S else NA; se <- if (ok) sqrt(0.5*(E/R^2+(F+G)/(R*S)+H/S^2)) else NA; Rr <- sum(a*n2/N); Sr <- sum(c*n1/N); P <- sum((n1*n2*(a+c)-a*c*N)/N^2); okr <- Rr > 0 && Sr > 0; RR <- if (okr) Rr/Sr else NA; serr <- if (okr) sqrt(P/(Rr*Sr)) else NA; K <- sum(n1*n2/N); J <- sum((a*b*n2^3+c*d*n1^3)/(n1*n2*N^2)); RD <- if (K > 0) sum((a*n2-c*n1)/N)/K else NA; serd <- if (K > 0) sqrt(J/K^2) else NA; D <- sum(a-n1*(a+c)/N); V <- sum(n1*n2*(a+c)*(b+d)/(N^2*(N-1))); chi <- if (V > 0) D^2/V else NA; p1 <- if (ok) OR*p0/(1-p0+OR*p0) else NA; list(OR = OR, se = se, L = exp(log(OR)-1.96*se), U = exp(log(OR)+1.96*se), RR = RR, serr = serr, RD = RD, serd = serd, D = D, V = V, chi = chi, p = if (V > 0) pchisq(chi, 1, lower.tail = FALSE) else NA, p1 = p1, avoided = 1000*(p0-p1)) }Base R.mh(c(0, 10, 30), c(50, 100, 200), c(4, 20, 25), c(50, 100, 100), 0.25)returns the values of the first example, and on the article's trials OR and chi equalmantelhaen.testwithcorrect = FALSE, with the limits agreeing to four decimals because R uses the exact normal quantile where this function uses 1.96. When R or S is 0, or no trials remain, OR, se and p1 are NA. When V is 0, chi and p are NA.Python:
import mathfirst, thendef mh(a, n1, c, n2, p0): T = [(x, m, y, k, m+k, m-x, k-y) for x, m, y, k in zip(a, n1, c, n2) if m > 0 and k > 0]; R = sum(x*d/N for x, m, y, k, N, b, d in T); S = sum(b*y/N for x, m, y, k, N, b, d in T); E = sum((x+d)*x*d/N**2 for x, m, y, k, N, b, d in T); F = sum((x+d)*b*y/N**2 for x, m, y, k, N, b, d in T); G = sum((b+y)*x*d/N**2 for x, m, y, k, N, b, d in T); H = sum((b+y)*b*y/N**2 for x, m, y, k, N, b, d in T); ok = R > 0 and S > 0; OR = R/S if ok else None; se = (0.5*(E/R**2+(F+G)/(R*S)+H/S**2))**0.5 if ok else None; Rr = sum(x*k/N for x, m, y, k, N, b, d in T); Sr = sum(y*m/N for x, m, y, k, N, b, d in T); P = sum((m*k*(x+y)-x*y*N)/N**2 for x, m, y, k, N, b, d in T); okr = Rr > 0 and Sr > 0; K = sum(m*k/N for x, m, y, k, N, b, d in T); J = sum((x*b*k**3+y*d*m**3)/(m*k*N**2) for x, m, y, k, N, b, d in T); D = sum(x-m*(x+y)/N for x, m, y, k, N, b, d in T); V = sum(m*k*(x+y)*(b+d)/(N**2*(N-1)) for x, m, y, k, N, b, d in T); p1 = OR*p0/(1-p0+OR*p0) if ok else None; return {'OR': OR, 'se': se, 'L': math.exp(math.log(OR)-1.96*se) if ok else None, 'U': math.exp(math.log(OR)+1.96*se) if ok else None, 'RR': Rr/Sr if okr else None, 'serr': (P/(Rr*Sr))**0.5 if okr else None, 'RD': sum((x*k-y*m)/N for x, m, y, k, N, b, d in T)/K if K > 0 else None, 'serd': (J/K**2)**0.5 if K > 0 else None, 'D': D, 'V': V, 'chi': D**2/V if V > 0 else None, 'p1': p1, 'avoided': 1000*(p0-p1) if ok else None}The function returns the same values as the R function, apart from the p-value, which only the R function returns. It returns None where R gives NA, with no error on an empty list or on a trial with an empty arm.Test (treated odds equal the odds ratio times the baseline odds): Expected result TRUE. The conversion route in the test differs from the cell's formula, and a treated probability cell doubled or halved gives FALSE. Excel check:
=ABS(TreatedProbabilityFromOddsRatio/(1-TreatedProbabilityFromOddsRatio)-PooledOddsRatioMH*BaselineProbability/(1-BaselineProbability))<0.000001Test (first example reproduced): With the three trials and a baseline of 0.25, the pooled odds ratio is 0.457 and the events avoided per 1,000 are 117.8161. Expected result TRUE, and doubling or halving either cell gives FALSE. Excel check:
=AND(ABS(PooledOddsRatioMH-0.457)<0.0005,ABS(EventsAvoidedPerThousand-117.8161)<0.05)Common error (carrying the odds ratio into a model unconverted): On the article's trials at a baseline of 0.25, multiplying by the odds ratio gives 0.159 and about 91 events avoided per 1,000, against 0.175 and about 75 through the odds, an overstatement of about 21% (derived).
Source: Deeks JJ, Higgins JPT. Statistical algorithms in Review Manager. Cochrane Statistical Methods Group; May 2022. Section Mantel-Haenszel methods for combining results across studies, equations 1 to 6, and the Peto odds ratio subsection for the mean and variance in the test.
N_1 = n1_1 + n2_1; b_1 = n1_1 - a_1; d_1 = n2_1 - c_1; N_2 = n1_2 + n2_2; b_2 = n1_2 - a_2; d_2 = n2_2 - c_2; N_3 = n1_3 + n2_3; b_3 = n1_3 - a_3; d_3 = n2_3 - c_3; R = a_1 * d_1 / N_1 + a_2 * d_2 / N_2 + a_3 * d_3 / N_3; S = b_1 * c_1 / N_1 + b_2 * c_2 / N_2 + b_3 * c_3 / N_3; E = (a_1 + d_1) * a_1 * d_1 / N_1^2 + (a_2 + d_2) * a_2 * d_2 / N_2^2 + (a_3 + d_3) * a_3 * d_3 / N_3^2; F = (a_1 + d_1) * b_1 * c_1 / N_1^2 + (a_2 + d_2) * b_2 * c_2 / N_2^2 + (a_3 + d_3) * b_3 * c_3 / N_3^2; G = (b_1 + c_1) * a_1 * d_1 / N_1^2 + (b_2 + c_2) * a_2 * d_2 / N_2^2 + (b_3 + c_3) * a_3 * d_3 / N_3^2; H = (b_1 + c_1) * b_1 * c_1 / N_1^2 + (b_2 + c_2) * b_2 * c_2 / N_2^2 + (b_3 + c_3) * b_3 * c_3 / N_3^2; OR_MH = R / S; lnOR_MH = log(OR_MH); SE_lnOR = sqrt(0.5 * (E / R^2 + (F + G) / (R * S) + H / S^2)); OR_L = exp(lnOR_MH - 1.96 * SE_lnOR); OR_U = exp(lnOR_MH + 1.96 * SE_lnOR); R_RR = a_1 * n2_1 / N_1 + a_2 * n2_2 / N_2 + a_3 * n2_3 / N_3; S_RR = c_1 * n1_1 / N_1 + c_2 * n1_2 / N_2 + c_3 * n1_3 / N_3; P = (n1_1 * n2_1 * (a_1 + c_1) - a_1 * c_1 * N_1) / N_1^2 + (n1_2 * n2_2 * (a_2 + c_2) - a_2 * c_2 * N_2) / N_2^2 + (n1_3 * n2_3 * (a_3 + c_3) - a_3 * c_3 * N_3) / N_3^2; RR_MH = R_RR / S_RR; SE_lnRR = sqrt(P / (R_RR * S_RR)); K = n1_1 * n2_1 / N_1 + n1_2 * n2_2 / N_2 + n1_3 * n2_3 / N_3; RD_MH = ((a_1 * n2_1 - c_1 * n1_1) / N_1 + (a_2 * n2_2 - c_2 * n1_2) / N_2 + (a_3 * n2_3 - c_3 * n1_3) / N_3) / K; J = (a_1 * b_1 * n2_1^3 + c_1 * d_1 * n1_1^3) / (n1_1 * n2_1 * N_1^2) + (a_2 * b_2 * n2_2^3 + c_2 * d_2 * n1_2^3) / (n1_2 * n2_2 * N_2^2) + (a_3 * b_3 * n2_3^3 + c_3 * d_3 * n1_3^3) / (n1_3 * n2_3 * N_3^2); SE_RD = sqrt(J / K^2); D_MH = (a_1 - n1_1 * (a_1 + c_1) / N_1) + (a_2 - n1_2 * (a_2 + c_2) / N_2) + (a_3 - n1_3 * (a_3 + c_3) / N_3); V_MH = n1_1 * n2_1 * (a_1 + c_1) * (b_1 + d_1) / (N_1^2 * (N_1 - 1)) + n1_2 * n2_2 * (a_2 + c_2) * (b_2 + d_2) / (N_2^2 * (N_2 - 1)) + n1_3 * n2_3 * (a_3 + c_3) * (b_3 + d_3) / (N_3^2 * (N_3 - 1)); chi2_MH = D_MH^2 / V_MH; p_1 = OR_MH * p_0 / (1 - p_0 + OR_MH * p_0); A_1000 = 1000 * (p_0 - p_1)
Try this function
Implementations
Excel
Excel Mantel-Haenszel odds ratio from one row per stratum
With one row per stratum and equal-length ranges named TrialEventsNew, TrialNonEventsNew, TrialEventsComparator and TrialNonEventsComparator, and a helper range TrialTotal holding the four cells added, the formulas go in order into OddsNumeratorMH, OddsDenominatorMH, OddsVarianceFirst, OddsVarianceSecond, OddsVarianceThird, OddsVarianceFourth, PooledOddsRatioMH, LogPooledOddsRatioMH, StandardErrorLogOddsRatioMH, OddsRatioLowerLimitMH and OddsRatioUpperLimitMH. A row left blank has a TrialTotal treated as 0 in the division and returns #DIV/0! in the first six cells. S equal to 0 returns #DIV/0!, and R equal to 0 returns a pooled value of 0, with #NUM! in the log and #DIV/0! in the standard error.
=SUMPRODUCT(TrialEventsNew*TrialNonEventsComparator/TrialTotal); =SUMPRODUCT(TrialNonEventsNew*TrialEventsComparator/TrialTotal); =SUMPRODUCT((TrialEventsNew+TrialNonEventsComparator)*TrialEventsNew*TrialNonEventsComparator/TrialTotal^2); =SUMPRODUCT((TrialEventsNew+TrialNonEventsComparator)*TrialNonEventsNew*TrialEventsComparator/TrialTotal^2); =SUMPRODUCT((TrialNonEventsNew+TrialEventsComparator)*TrialEventsNew*TrialNonEventsComparator/TrialTotal^2); =SUMPRODUCT((TrialNonEventsNew+TrialEventsComparator)*TrialNonEventsNew*TrialEventsComparator/TrialTotal^2); =OddsNumeratorMH/OddsDenominatorMH; =LN(PooledOddsRatioMH); =SQRT(0.5*(OddsVarianceFirst/OddsNumeratorMH^2+(OddsVarianceSecond+OddsVarianceThird)/(OddsNumeratorMH*OddsDenominatorMH)+OddsVarianceFourth/OddsDenominatorMH^2)); =EXP(LogPooledOddsRatioMH-1.96*StandardErrorLogOddsRatioMH); =EXP(LogPooledOddsRatioMH+1.96*StandardErrorLogOddsRatioMH)
Assumptions
Stratified counts with both pooled sums above zero for the Mantel-Haenszel odds ratio
Each patient appears in one table, and comparisons stay inside the table, so a trial is a stratum and its randomisation is kept. A zero cell in one stratum needs no correction as long as R and S stay above 0. Cochrane Handbook section 10.4.4.1 says these methods need a zero-cell correction only if the same cell is zero in all the included studies. A trial with no events in either arm adds nothing to any sum, so it drops out, which matches the exclusion in section 10.4.4.2 (derived).
One odds ratio common to all strata in the Mantel-Haenszel pooled estimate
The estimate is a fixed-effect one, with one effect assumed common to all studies on the odds ratio scale. Cochrane Handbook section 10.10.4.2 notes that such methods give more robust estimates with few studies at the cost of ignoring heterogeneity. RevMan's heterogeneity statistic for this analysis takes the form of HE-FM-ADMA-002, centred on the Mantel-Haenszel estimate where that record uses the inverse-variance one.
Variance estimator for sparse and large strata in the Mantel-Haenszel log odds ratio
Robins, Breslow and Greenland propose the estimator as consistent in both sparse data and large-strata limiting models. The interval further treats lnOR_MH as approximately normal, with 1.96 as the two-sided 95% point.
Worked examples
Mantel-Haenszel odds ratio of the article's two illustrative trials
The article's illustrative trials report hospital admission within 12 months. Trial A has 20 of 100 events on the drug against 30 of 100 on placebo, and trial B, randomised 2 to 1, has 80 of 200 against 50 of 100. R is 7 + 13.333 = 20.333 and S is 12 + 20 = 32, so the pooled odds ratio is 0.635 with a 95% interval of 0.431 to 0.936, as in the article. The collapsed table would give 0.750.
a_1 = 20; b_1 = 80; c_1 = 30; d_1 = 70; a_2 = 80; b_2 = 120; c_2 = 50; d_2 = 50; N_1 = 200; N_2 = 300; R = 20.3333; S = 32; E = 8.9278; F = 14.0667; G = 11.4056; H = 17.9333; OR_MH = 0.6354; lnOR_MH = -0.4535; SE_lnOR = 0.1978; OR_L = 0.4312; OR_U = 0.9363
Limiting case of two identical tables for the Mantel-Haenszel odds ratio
Two illustrative trials, each with the counts of trial A, return the odds ratio of trial A, 0.5833. Its standard error is the single-table value of 0.3318 divided by the square root of 2, or 0.2346 (derived), since RevMan's single-study standard error is the square root of 1/a + 1/b + 1/c + 1/d. The case is illustrative and checks an implementation.
a_1 = 20; b_1 = 80; c_1 = 30; d_1 = 70; a_2 = 20; b_2 = 80; c_2 = 30; d_2 = 70; N_1 = 200; N_2 = 200; R = 14; S = 24; E = 6.3; F = 10.8; G = 7.7; H = 13.2; OR_MH = 0.5833; lnOR_MH = -0.539; SE_lnOR = 0.2346; OR_L = 0.3683; OR_U = 0.924
Illustrative zero cell in one stratum of a Mantel-Haenszel odds ratio
An illustrative small trial has no events among 50 patients on the new treatment and 4 among 50 on the comparator, and a second has 10 of 100 against 20 of 100. The first trial has an undefined log odds ratio on its own, yet it still adds 2 to S and the pooled estimate runs without a correction, giving 0.3636.
a_1 = 0; b_1 = 50; c_1 = 4; d_1 = 46; a_2 = 10; b_2 = 90; c_2 = 20; d_2 = 80; N_1 = 100; N_2 = 200; R = 4; S = 11; E = 1.8; F = 4.97; G = 2.2; H = 6.03; OR_MH = 0.3636; lnOR_MH = -1.0116; SE_lnOR = 0.4033; OR_L = 0.165; OR_U = 0.8016
Common errors
Collapsing trials into one table before computing an odds ratio
Adding events and patients across trials ignores the randomisation inside each trial, the problem HE-ER-ARR-001 describes for a risk difference. In the article's example two thirds of treated patients but half of placebo patients came from the higher-risk trial, so the collapsed odds ratio is 0.750 against a pooled 0.635 and study values of 0.583 and 0.667. The collapsed value lies outside the range of both trials.
Building the Mantel-Haenszel odds ratio interval on the natural scale
Adding 1.96 standard errors of the log odds ratio to the odds ratio itself mixes two scales. In the article's example it gives 0.248 to 1.023, which crosses 1, when the correct interval on the log scale is 0.431 to 0.936 (derived). The limits are exponentiated after the log-scale interval is formed.
Adding 0.5 to zero cells by default in a Mantel-Haenszel odds ratio
Cochrane Handbook section 10.4.4.1 notes that many programs apply the correction to these methods as well, and that a fixed correction usually biases study estimates towards no difference. In the illustrative zero-cell example, adding 0.5 to the four cells of the first trial moves the pooled odds ratio from 0.3636 to 0.3766, towards 1 (derived). HE-ER-BINOM-007 records the same bias for binomial synthesis.
Applying a pooled Mantel-Haenszel odds ratio to a baseline risk as if it were a risk ratio
Multiplying a baseline probability of 0.25 by the odds ratio of 0.6354 gives 0.159, when the conversion through the odds in HE-FM-NMA-004 gives 0.175, as in the article. The gap of 16 events per 1,000 widens as the baseline risk rises (derived).
Sources
RevMan statistical algorithms for the Mantel-Haenszel odds ratio and its standard error
Deeks JJ, Higgins JPT. Statistical algorithms in Review Manager. Cochrane Statistical Methods Group; May 2022. Section Mantel-Haenszel methods for combining results across studies, subsection Odds ratio. Equation 1 gives the summary log odds ratio as the log of a weighted average of study odds ratios, the unnumbered line after it gives the summary odds ratio as that average, with weight b c / N, and equation 2 gives the standard error of the log summary from R, S, E, F, G and H as printed. The section Individual study estimates, dichotomous outcomes gives the single-study standard error.
Robins, Breslow and Greenland on a Mantel-Haenszel variance for sparse and large strata
Robins J, Breslow N, Greenland S. Estimators of the Mantel-Haenszel variance consistent in both sparse data and large-strata limiting models. Biometrics. 1986;42(2):311-323. The abstract proposes a new, easily computed estimator of the variance of the Mantel-Haenszel estimator of the common odds ratio, consistent in both limiting models. The SAS/STAT documentation in HE-SR-MHM-012, section Adjusted Odds Ratio and Relative Risk Estimates, subsection Odds Ratio, Case-Control Studies, prints the variance under this paper's name, with the same terms as RevMan equation 2.
Robins, Greenland and Breslow general estimator named in the RevMan reference list
Robins J, Greenland S, Breslow NE. A general estimator for the variance of the Mantel-Haenszel odds ratio. American Journal of Epidemiology. 1986;124(5):719-723. Listed in the Bibliography of the RevMan statistical algorithms.
Cochrane Handbook chapter 10 on Mantel-Haenszel methods and zero cells
Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA, Simmonds M (editors). Chapter 10: Analysing data and undertaking meta-analyses (last updated November 2026). In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5.1. Cochrane; 2026. Section 10.4.1 (Mantel-Haenszel methods use a weighting scheme that depends on the effect measure, have better statistical properties with few events and are generally preferable to inverse variance in fixed-effect analyses), section 10.4.4.1 (zero-cell corrections needed only if the same cell is zero in all included studies; fixed corrections usually bias towards no difference), section 10.4.4.2 (studies with no events in both arms) and section 10.10.4.2 (more robust estimates with few studies, at the cost of ignoring heterogeneity).
Mantel and Haenszel 1959 paper on retrospective studies of disease
Mantel N, Haenszel W. Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute. 1959;22(4):719-748. The original paper, which Cochrane Handbook section 10.4.1 cites for these methods and the RevMan statistical algorithms list in their Bibliography.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0
