How to use this calculator
Combine independent 2×2 strata into a common sample odds ratio and an uncorrected Cochran–Mantel–Haenszel association test.
- Enter Strata as rows a b c d. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Stratified Mantel Haenszel common odds ratio explained
This guide follows stratified mantel haenszel common odds ratio calculator from its stated formula through a worked example, then identifies the assumptions that bound the result.
Inputs, symbols, and units
x— Strata as rows a b c d- One stratum per row in a,b,c,d order for table [[a,b],[c,d]]. Flatten rows with consistent group and outcome coding. Use comma-separated values in the stated order.
Formula and method
ORmh=Σ(ai·di/ni)/Σ(bi·ci/ni); χ²=[Σ(ai−Eai)]²/ΣVar(ai), using fixed-margin hypergeometric moments.
Each row is a separate 2×2 stratum in a consistent orientation. Within-stratum expected top-left counts and variances condition on both margins. The score sums over strata before being squared, preserving the direction of the common association.
A worked scenario
Strata as rows a b c d = 8,12,4,16,10,15,6,19,5,9,3,11.
- Mantel Haenszel common sample odds ratio: 2.26126126
- Uncorrected CMH chi-square: 3.89964629
- Chi-square reference p-value: 0.04829627
Three strata contribute differently sized tables. Keeping each stratum separate allows the estimate to account for stratification rather than simply pooling all cells.
Assumptions and edge cases
Independent observations and strata. A common odds ratio is most interpretable when stratum effects are compatible. No homogeneity test or odds-ratio confidence interval is supplied. The p-value is asymptotic and has no continuity correction.
Reading the outputs
The odds ratio uses the same a,b,c,d orientation in every row. The CMH result tests conditional independence; it is not an exact Fisher test on the pooled table.
Frequently asked questions
Can I reverse one stratum?
No. Outcome and group coding must stay consistent across all strata.
Is the reported test exact?
No. It uses a one-degree-of-freedom chi-square reference.
Does stratification remove every confounder?
No. It adjusts only for the grouping represented by the strata and does not establish causation.
How do I use the Stratified Mantel Haenszel common odds ratio calculator?
Enter Strata as rows a b c d. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Stratified Mantel Haenszel common odds ratio?
Strata as rows a b c d = 8,12,4,16,10,15,6,19,5,9,3,11. Mantel Haenszel common sample odds ratio: 2.26126126 Uncorrected CMH chi-square: 3.89964629 Chi-square reference p-value: 0.04829627 Three strata contribute differently sized tables. Keeping each stratum separate allows the estimate to account for stratification rather than simply pooling all cells.
Method reference: R stats: Cochran Mantel Haenszel tests.
Read our calculation methodology.