# Mantel-Haenszel Methods for Stratified Categorical Data

## Quick Answer

- Mantel-Haenszel methods provide a weighted summary of association across strata, allowing researchers to adjust for confounding variables when analyzing categorical data.
- The practical next step is to construct stratum-specific contingency tables, calculate the Mantel-Haenszel adjusted odds ratio, and then test for homogeneity across strata.
- A key limitation is that the method assumes a common effect across strata, when stratum-specific estimates differ substantially, the adjusted summary may be misleading.

## The Confounding Problem in Categorical Data Analysis

Categorical data analysis in biological research frequently involves examining associations between exposures and outcomes. A researcher might ask whether a particular genetic variant is associated with disease status, whether a treatment improves recovery rates, or whether a behavioral factor correlates with a laboratory measurement. Each of these questions can be framed as a two-by-two table with exposure status on one axis and outcome status on the other.

The crude analysis of such a table produces an odds ratio that describes the association without considering other variables. This approach is straightforward and often appears in early exploratory analyses. However, the crude odds ratio can be biased when a third variable influences both the exposure and the outcome. This third variable is called a confounder, and its presence can create an apparent association where none exists, mask a genuine association, or reverse the direction of a true effect.

Consider a study examining whether a particular dietary pattern is associated with a biomarker of inflammation. Age may influence both dietary choices and biomarker levels. If the study population includes a wide age range, the crude analysis may show an association that is actually driven by age differences instead of by the dietary pattern itself. Stratification offers a solution. By dividing the study population into age groups and analyzing the exposure-outcome relationship within each group, the researcher can examine the association while holding age constant.

The Mantel-Haenszel method provides a formal framework for this stratified analysis. It combines information across strata into a single adjusted estimate while also providing a test for whether the association is consistent across strata. This method is widely used in epidemiology, clinical research, and bioinformatics because it is computationally simple, does not require large sample sizes, and produces interpretable results.

The method was developed by Nathan Mantel and William Haenszel in 1959 and has remained a standard tool in biostatistics. Its persistence reflects its utility in addressing a fundamental problem in observational research, the problem of confounding. Researchers who work with categorical data, whether from clinical trials, cohort studies, case-control studies, or genomic analyses, will encounter situations where stratification is necessary. The Mantel-Haenszel approach provides a principled way to handle these situations.

## At a Glance

The table below summarizes the key elements of the Mantel-Haenszel method for stratified categorical data analysis.

| Element | Description | Practical Consideration |
| --- | --- | --- |
| Data input | Stratified two-by-two tables with exposure and outcome counts | Each stratum must have complete data for all four cells |
| Adjusted estimate | Mantel-Haenszel odds ratio, a weighted average of stratum-specific odds ratios | Weights are proportional to the inverse variance of each stratum estimate |
| Homogeneity test | Breslow-Day test or similar procedure to assess whether stratum-specific effects are equal | If the test is significant, the adjusted summary may not be appropriate |
| Software implementation | Available in R, SAS, Stata, SPSS, and Python libraries | Verify that the software uses the same formula and confidence interval method |
| Interpretation | The adjusted odds ratio represents the association within strata, controlling for the stratifying variable | The result is meaningful only if the homogeneity assumption holds |
| Reporting | Include stratum-specific estimates, the adjusted estimate, and the homogeneity test result | Follow reporting guidelines for observational studies |

## Core Principles of the Mantel-Haenszel Method

The Mantel-Haenszel method rests on several core principles that researchers must understand before applying it to their data.

### Stratification as a Control Strategy

Stratification is a design-based approach to confounding control. The researcher divides the study population into subgroups, or strata, based on the confounding variable. Within each stratum, the confounding variable is held constant or nearly constant, so the exposure-outcome association can be estimated without the distorting influence of that variable.

The choice of stratification variable is critical. The variable must be associated with both the exposure and the outcome, and it must not be on the causal pathway between the exposure and the outcome. A variable that is an intermediate step in the causal chain should not be treated as a confounder because adjusting for it would remove part of the true effect.

The number of strata and the definition of stratum boundaries also matter. Too few strata may leave residual confounding within strata. Too many strata may create sparse data problems, where some strata have very few observations or even zero counts in some cells.

### The Mantel-Haenszel Adjusted Odds Ratio

The Mantel-Haenszel adjusted odds ratio is a weighted average of the stratum-specific odds ratios. The weight for each stratum is proportional to the inverse of the variance of the stratum-specific odds ratio. This weighting scheme gives more influence to strata with more information and less influence to strata with sparse data.

The formula for the Mantel-Haenszel adjusted odds ratio is:

OR_MH = sum over strata of (a_i * d_i / n_i) divided by sum over strata of (b_i * c_i / n_i)

In this formula, a_i is the number of exposed cases in stratum i, b_i is the number of exposed non-cases, c_i is the number of unexposed cases, d_i is the number of unexposed non-cases, and n_i is the total number of subjects in stratum i.

This formula is simple to compute by hand for small datasets, which is one reason the method has remained popular. It does not require iterative estimation or complex numerical methods.

### The Homogeneity Assumption

The Mantel-Haenszel adjusted odds ratio is a summary measure. It is most meaningful when the stratum-specific odds ratios are similar to each other. When the stratum-specific estimates are similar, the summary estimate represents a common effect across strata.

When the stratum-specific estimates differ substantially, the summary estimate may not represent any of the individual strata well. This situation is called effect modification or interaction. In this case, the adjusted summary can be misleading because it obscures the fact that the association varies across strata.

The Breslow-Day test is commonly used to assess homogeneity of the odds ratio across strata. A significant test result suggests that the stratum-specific effects are not equal and that the adjusted summary should be interpreted with caution.

## Data Inputs and Preparation

The Mantel-Haenszel method requires specific data inputs. Researchers must organize their data correctly before performing the analysis.

### Required Data Structure

The data must be organized as a series of two-by-two tables, one for each stratum. Each table has the following structure:

| | Outcome present | Outcome absent |
| --- | --- | --- |
| Exposed | a | b |
| Unexposed | c | d |

The counts a, b, c, and d are the number of subjects in each category. The total number of subjects in the stratum is n = a + b + c + d.

The exposure and outcome variables must be binary. If the exposure or outcome has more than two categories, the researcher must decide how to collapse the categories or use a different method.

### Stratification Variable Selection

The stratification variable must be chosen based on substantive knowledge of the research question. Common stratification variables in biological research include age group, sex, study center, genotype, or disease subtype.

The variable must be measured before the outcome occurs, or at least measured independently of the outcome. It must be associated with the exposure and the outcome in the study population.

The number of strata should be limited to avoid sparse data problems. A general rule is that each stratum should have a reasonable number of observations in each cell. When strata become too small, the stratum-specific estimates become unstable, and the Mantel-Haenszel adjusted estimate may be biased.

### Missing Data Considerations

Missing data can complicate the analysis. If the stratification variable is missing for some subjects, those subjects cannot be assigned to a stratum. If the exposure or outcome is missing, the subject cannot be included in the two-by-two table.

The researcher must decide how to handle missing data before performing the analysis. Options include complete-case analysis, where subjects with any missing data are excluded, or imputation methods. The choice depends on the amount of missing data and the mechanism that produced the missingness.

## Step-by-Step Workflow

The following workflow describes the steps for performing a Mantel-Haenszel adjusted analysis.

### Step 1: Define the Research Question

The researcher must clearly define the exposure, the outcome, and the potential confounding variable. The research question should specify the population of interest and the time frame of the study.

### Step 2: Construct Stratum-Specific Tables

Divide the study population into strata based on the confounding variable. For each stratum, construct a two-by-two table with exposure status and outcome status.

### Step 3: Calculate Stratum-Specific Odds Ratios

For each stratum, calculate the odds ratio using the formula:

OR_i = (a_i * d_i) / (b_i * c_i)

This gives the association between exposure and outcome within each stratum.

### Step 4: Calculate the Mantel-Haenszel Adjusted Odds Ratio

Use the formula described above to calculate the adjusted odds ratio. This is the weighted average of the stratum-specific estimates.

### Step 5: Test for Homogeneity

Perform the Breslow-Day test or a similar test to assess whether the stratum-specific odds ratios are homogeneous. If the test is significant, the adjusted summary may not be appropriate.

### Step 6: Calculate the Confidence Interval

Calculate the confidence interval for the adjusted odds ratio. The confidence interval provides a range of plausible values for the true effect.

### Step 7: Interpret and Report the Results

Interpret the adjusted odds ratio in the context of the research question. Report the stratum-specific estimates, the adjusted estimate, the confidence interval, and the homogeneity test result.

## Options and Tradeoffs in Stratified Analysis

The Mantel-Haenszel method is one of several approaches for analyzing stratified categorical data. Researchers should understand the alternatives and the tradeoffs involved.

### Mantel-Haenszel versus Logistic Regression

Logistic regression is a more flexible approach for adjusting for confounding variables. It can handle multiple confounders simultaneously and can include continuous variables without the need for categorization.

The Mantel-Haenszel method is simpler and does not require the same computational resources. It is also more stable when the number of events is small, because it does not rely on maximum likelihood estimation.

The tradeoff is that the Mantel-Haenszel method can only handle a single stratification variable at a time, or a small number of variables if the strata are cross-classified. Logistic regression can handle many variables simultaneously.

### Mantel-Haenszel versus Stratum-Specific Analysis

An alternative approach is to report the stratum-specific odds ratios separately without combining them into a single summary. This approach is appropriate when the stratum-specific effects are heterogeneous, because it preserves the information about how the effect varies across strata.

The tradeoff is that the stratum-specific estimates may be imprecise, especially in strata with small sample sizes. The Mantel-Haenszel summary provides a more precise estimate when the effects are homogeneous.

### Mantel-Haenszel versus Other Adjusted Estimates

Other methods for calculating adjusted odds ratios include the Cochran-Mantel-Haenszel test, which is a test of association across strata, and the Mantel-Haenszel estimator for risk ratios. The choice of method depends on the measure of association that is most appropriate for the research question.

## Observations and Measurements

The Mantel-Haenszel method produces several outputs that researchers should examine carefully.

### Stratum-Specific Odds Ratios

The stratum-specific odds ratios show the association between exposure and outcome within each stratum. These estimates are the building blocks of the adjusted summary. Researchers should examine them to understand the pattern of association across strata.

### The Adjusted Odds Ratio

The adjusted odds ratio is the primary output of the analysis. It represents the association between exposure and outcome after controlling for the stratification variable.

### The Homogeneity Test Result

The homogeneity test result indicates whether the stratum-specific effects are consistent. A significant test suggests that the effects are not homogeneous and that the adjusted summary may not be appropriate.

### The Confidence Interval

The confidence interval provides a range of plausible values for the adjusted odds ratio. A wide confidence interval indicates imprecise estimation, while a narrow confidence interval indicates greater precision.

## Records and Documentation

Proper documentation is essential for reproducible research. The following records should be maintained for a Mantel-Haenszel analysis.

### Data Dictionary

A data dictionary should describe each variable in the dataset, including the variable name, the variable label, the type of variable, and the coding scheme.

### Analysis Code

The analysis code should be saved and versioned. The code should be commented to explain the steps of the analysis.

### Output Logs

The output logs should be saved to document the results of the analysis. This includes the stratum-specific estimates, the adjusted estimate, the homogeneity test result, and the confidence interval.

### Analysis Plan

The analysis plan should be written before the analysis is performed. It should describe the research question, the data inputs, the analysis steps, and the criteria for interpreting the results.

## Quality and Welfare Controls

Quality control is important in any statistical analysis. The following controls should be applied to a Mantel-Haenszel analysis.

### Data Validation

The data should be validated before the analysis. This includes checking for missing values, out-of-range values, and inconsistencies in the data.

### Sensitivity Analysis

A sensitivity analysis should be performed to assess the robustness of the results. This could include changing the number of strata, changing the stratum boundaries, or using a different method for calculating the adjusted estimate.

### Reporting Guidelines

The reporting of the analysis should follow established guidelines for observational research. The [EQUATOR Network](https://www.equator-network.org/) provides a collection of reporting guidelines that can help researchers report their methods and results transparently.

## Common Failure Patterns

Several common problems can arise in a Mantel-Haenszel analysis. Researchers should be aware of these patterns and take steps to avoid them.

### Sparse Strata

Sparse strata occur when some strata have very few observations or zero cells. This can lead to unstable stratum-specific estimates and a biased adjusted summary.

### Heterogeneous Effects

When the stratum-specific effects are heterogeneous, the adjusted summary can be misleading. The homogeneity test should be used to detect this problem.

### Incorrect Stratification Variable

If the stratification variable is not a true confounder, the adjusted estimate may not be valid. The variable must be associated with both the exposure and the outcome.

### Misclassification of Exposure or Outcome

Misclassification of the exposure or outcome can bias the results. The researcher should assess the accuracy of the measurements and consider the impact of misclassification.

## Limitations and Interpretation

The Mantel-Haenszel method has several limitations that researchers must understand.

### The Homogeneity Assumption

The method assumes that the stratum-specific effects are homogeneous. When this assumption is violated, the adjusted summary is not a meaningful single estimate.

### The Single Confounder Limitation

The method is designed for a single confounder or a small number of confounders. When many confounders must be controlled, other methods such as logistic regression may be more appropriate.

### The Binary Outcome Requirement

The method requires a binary outcome. If the outcome has more than two categories, the method cannot be applied directly.

### The Observational Study Context

The Mantel-Haenszel method controls for measured confounders. It cannot control for unmeasured confounders, which can still bias the results.

## Safety and Regulatory Context

The Mantel-Haenszel method is a statistical tool, and its use is governed by the principles of good research practice. Researchers should be aware of the regulatory and ethical context of their work.

### Research Ethics

Research involving human subjects must be conducted in accordance with ethical principles. The [Committee on Publication Ethics](https://publicationethics.org/core-practices) provides guidance on authorship, peer review, data handling, and conflicts of interest.

### Data Management and Sharing

Researchers who receive funding from the National Institutes of Health must comply with the [NIH Data Management and Sharing Policy](https://sharing.nih.gov/data-management-and-sharing-policy). This policy requires researchers to plan for the management and sharing of their data.

### Grant and Funding Context

Researchers who apply for NIH funding should be aware of the [NIH Grants and Funding](https://grants.nih.gov/) policies. The application and review process includes expectations for the rigor and transparency of the research methods.

### Researcher Identity and Records

Researchers should maintain their identity and records through [ORCID](https://info.orcid.org/researchers). This helps to ensure that their work is properly attributed and that their research records are complete.

## Professional Escalation Criteria

Researchers should seek additional expertise when they encounter certain situations in their analysis.

### When to Consult a Biostatistician

A biostatistician should be consulted when the analysis involves complex data structures, multiple confounders, or when the results are difficult to interpret. A biostatistician can also help with the selection of the appropriate method and the interpretation of the results.

### When to Seek Peer Review

The analysis should be reviewed by a peer before it is reported. Peer review can help to identify errors in the analysis and to improve the interpretation of the results.

### When to Report a Concern

If the researcher suspects a problem with the data or the analysis, the concern should be reported to the appropriate authority. This may include the research supervisor, the institutional review board, or the journal editor.

## A Practical Decision Framework for Mantel-Haenszel Analysis

The Mantel-Haenszel method produces a single adjusted estimate, but the path from raw data to that estimate involves several decisions that materially affect the result. Researchers often make these decisions implicitly or by habit, which can lead to adjusted estimates that do not reflect the underlying data structure. This section provides a structured decision framework that forces explicit choices at each stage of the analysis, a record system for documenting those choices, and a troubleshooting method for diagnosing problems when results behave unexpectedly.

### The Decision Framework Overview

The framework consists of five decision gates that must be passed in sequence. Each gate requires a documented answer before proceeding to the next. The gates are:

1. Stratum construction decisions
2. Sparse data handling decisions
3. Homogeneity assessment decisions
4. Summary measure selection decisions
5. Sensitivity analysis decisions

The framework is designed to be completed before the primary analysis is run. This prevents the common failure pattern where researchers make decisions after seeing results, which can introduce bias through post hoc reasoning.

### Gate 1: Stratum Construction Decisions

The first gate addresses how strata are defined. The stratification variable must be chosen based on substantive knowledge of the causal structure, not on statistical criteria alone. The researcher must document the following:

**Variable selection.** The stratification variable must be a confounder, meaning it is associated with both the exposure and the outcome and is not on the causal pathway between them. The researcher should write down the causal diagram or the reasoning that supports the choice of stratification variable. If the variable is a mediator, the adjusted estimate will remove part of the true effect and will be biased toward the null.

**Number of strata.** The number of strata is a tradeoff between residual confounding and sparse data. Fewer strata leave more residual confounding within strata. More strata create smaller cell counts and less stable estimates. A practical approach is to start with the number of strata that corresponds to meaningful categories of the confounding variable, such as age groups that reflect developmental stages or disease subtypes that reflect distinct pathophysiologic processes.

**Stratum boundaries.** For continuous variables such as age or biomarker levels, the boundaries between strata must be specified. The boundaries should be chosen before the analysis and should be based on substantive knowledge. The researcher should record the boundaries and the rationale for choosing them. A sensitivity analysis can later test whether the results change with different boundaries.

**Cross-classification decisions.** When two or more stratification variables are needed, the researcher must decide whether to cross-classify them into a single set of strata or to use a different approach. Cross-classification multiplies the number of strata, which can create sparse data problems. The researcher should record the decision and the expected number of subjects per stratum.

### Gate 2: Sparse Data Handling Decisions

The second gate addresses the problem of sparse strata. Sparse strata are those with very few observations in some cells of the two-by-two table. Sparse data can produce unstable stratum-specific estimates and can bias the adjusted summary.

**Cell count thresholds.** The researcher should establish a minimum cell count threshold before the analysis. A common threshold is at least five observations in each cell of the two-by-two table. When a stratum has fewer than five observations in any cell, the stratum-specific odds ratio is unstable and the Mantel-Haenszel weight may be dominated by a single observation.

**Zero cell handling.** Zero cells are a special case of sparse data. When a cell has zero observations, the stratum-specific odds ratio is either zero or infinite, and the Mantel-Haenszel formula may produce undefined values. The researcher must decide how to handle zero cells before the analysis. Options include adding a small constant to each cell, collapsing adjacent strata, or excluding the stratum from the analysis. Each option has different implications for bias and precision.

**Stratum collapsing.** When several strata are sparse, the researcher can collapse adjacent strata into a single stratum. This increases the cell counts but may introduce residual confounding if the collapsed strata are not homogeneous. The researcher should record which strata were collapsed and the rationale for the collapse.

**Exclusion decisions.** Excluding sparse strata from the analysis is an option, but it changes the population that the adjusted estimate represents. The researcher must record the number of excluded subjects and the reason for exclusion. The excluded subjects should be described in the report so that readers can assess the generalizability of the results.

### Gate 3: Homogeneity Assessment Decisions

The third gate addresses the homogeneity assumption. The Mantel-Haenszel adjusted odds ratio is a summary measure that is most meaningful when the stratum-specific effects are similar. The researcher must decide how to assess homogeneity and how to respond to evidence of heterogeneity.

**Test selection.** The Breslow-Day test is the most common test for homogeneity of the odds ratio across strata. The researcher should record which test is used and the version of the test that is implemented in the software. Different software packages may implement the test differently, and the results can vary.

**Significance threshold.** The researcher must decide on the significance threshold for the homogeneity test before the analysis. A common threshold is 0.05, but the researcher may choose a different threshold based on the number of strata and the sample size. The threshold should be recorded in the analysis plan.

**Interpretation of a significant test.** A significant homogeneity test indicates that the stratum-specific effects are not equal. The researcher must decide how to interpret this result. Options include reporting the stratum-specific estimates separately, using a different summary measure, or investigating the source of the heterogeneity.

**Effect modification versus confounding.** The distinction between effect modification and confounding is important. Effect modification means that the effect of the exposure on the outcome differs across strata. Confounding means that the association is distorted by a third variable. The Mantel-Haenszel method controls for confounding but does not address effect modification. When effect modification is present, the adjusted summary is not a meaningful single estimate.

### Gate 4: Summary Measure Selection Decisions

The fourth gate addresses the choice of summary measure. The Mantel-Haenszel method can produce an adjusted odds ratio, an adjusted risk ratio, or an adjusted risk difference. The choice of measure depends on the research question and the study design.

**Odds ratio versus risk ratio.** The odds ratio is the default measure for case-control studies and is also commonly used in cohort studies. The risk ratio is more interpretable for cohort studies and clinical trials. The risk ratio is also more appropriate when the outcome is common, because the odds ratio overestimates the risk ratio when the outcome occurs in more than 10 percent of the population.

**Risk difference.** The risk difference is the absolute difference in risk between the exposed and unexposed groups. It is useful for public health and clinical decision making because it provides a measure of the absolute effect. The Mantel-Haenszel method can produce an adjusted risk difference, but the formula is different from the adjusted odds ratio.

**The choice of measure should be made before the analysis.** The researcher should record the measure of association that will be reported and the rationale for the choice. The choice should be based on the research question and the study design, not on which measure produces a more favorable result.

### Gate 5: Sensitivity Analysis Decisions

The fifth gate addresses the sensitivity of the results to the decisions made in the previous gates. A sensitivity analysis is a set of analyses that test whether the results change when the assumptions are varied.

**Stratum boundary sensitivity.** The researcher should repeat the analysis with different stratum boundaries. For example, if the primary analysis uses age groups of 20 to 39, 40 to 59, and 60 and older, the sensitivity analysis might use age groups of 18 to 44, 45 to 64, and 65 and older. If the adjusted odds ratio changes substantially, the results are sensitive to the choice of boundaries.

**Stratum number sensitivity.** The researcher should repeat the analysis with a different number of strata. For example, if the primary analysis uses three strata, the sensitivity analysis might use two strata or four strata. If the results change substantially, the choice of the number of strata is important.

**Sparse data handling sensitivity.** The researcher should repeat the analysis with different sparse data handling decisions. For example, if the primary analysis added a small constant to zero cells, the sensitivity analysis might exclude the zero-cell strata. If the results change, the sparse data handling decision is important.

**Confounder selection sensitivity.** The researcher should repeat the analysis with a different stratification variable or with an additional stratification variable. If the results change substantially, the choice of confounders is important.

### The Record System

The decision framework requires a record system that documents each decision and the rationale for it. The record system should be maintained in a structured format that can be reviewed by a peer or a supervisor.

**The analysis decision log.** The analysis decision log is a table with columns for the decision gate, the decision made, the rationale, and the date. The log should be completed before the primary analysis is run. The log should be updated if a decision is changed during the analysis.

**The stratum specification table.** The stratum specification table records the stratification variable, the number of strata, the stratum boundaries, and the expected number of subjects per stratum. The table should be completed before the analysis and should be included in the final report.

**The sensitivity analysis table.** The sensitivity analysis table records each sensitivity analysis that was performed, the change that was made, and the result. The table should include the adjusted odds ratio, the confidence interval, and the homogeneity test result for each sensitivity analysis.

**The analysis plan document.** The analysis plan document should include the decision framework, the decision log, the stratum specification table, and the sensitivity analysis table. The document should be written before the analysis and should be versioned. The final version should be included in the report or made available as supplementary material.

### Troubleshooting Method

The troubleshooting method is a structured approach for diagnosing problems when the results of the analysis are unexpected or when the analysis fails to produce a result.

**Step 1: Check the data structure.** The first step is to verify that the data are organized correctly. The data should be a series of two-by-two tables, one for each stratum. The counts in each cell should be checked for accuracy. The total number of subjects in each stratum should be verified.

**Step 2: Check the stratum-specific estimates.** The stratum-specific odds ratios should be calculated and examined. If the stratum-specific estimates are wildly different from each other, the homogeneity assumption is likely violated. If the stratum-specific estimates are all close to the null, the adjusted estimate will also be close to the null.

**Step 3: Check the sparse data handling.** The researcher should verify that the sparse data handling decisions were applied correctly. If a stratum has a zero cell and the small constant was not added, the adjusted estimate may be undefined. If a stratum was excluded, the researcher should verify that the exclusion was recorded.

**Step 4: Check the homogeneity test.** The homogeneity test result should be examined. If the test is significant, the adjusted summary may not be appropriate. The researcher should consider reporting the stratum-specific estimates separately.

**Step 5: Check the software implementation.** The researcher should verify that the software used the correct formula for the adjusted odds ratio and the confidence interval. Different software packages may use different formulas, and the results can differ.

**Step 6: Check the sensitivity analysis.** The researcher should review the sensitivity analysis results. If the results change substantially across the sensitivity analyses, the primary analysis is not robust.

### Common Failure Patterns in the Decision Framework

The decision framework is designed to prevent common failure patterns. The following patterns are the most frequent sources of error in Mantel-Haenszel analysis.

**Post hoc stratum selection.** The most common failure is selecting the stratum boundaries after looking at the data. This can introduce bias because the researcher may choose boundaries that produce a desired result. The decision framework prevents this by requiring the boundaries to be specified before the analysis.

**Ignoring sparse data.** The second most common failure is ignoring sparse data. The researcher may run the analysis without checking the cell counts and may produce an adjusted estimate that is unstable. The decision framework prevents this by requiring a sparse data handling decision before the analysis.

**Misinterpreting heterogeneity.** The third most common failure is misinterpreting a significant homogeneity test. The researcher may report the adjusted estimate even when the stratum-specific effects are heterogeneous. The decision framework prevents this by requiring the researcher to decide how to interpret heterogeneity before the analysis.

**Incomplete sensitivity analysis.** The fourth most common failure is performing an incomplete sensitivity analysis. The researcher may test only one or two assumptions and may miss a critical assumption. The decision framework prevents this by requiring a sensitivity analysis for each decision gate.

### Reporting the Decision Framework

The decision framework should be reported in the methods section of the final report. The report should include the decision log, the stratum specification table, and the sensitivity analysis table. The report should describe the decisions that were made and the rationale for each decision.

The [EQUATOR Network](https://www.equator-network.org/) provides reporting guidelines for observational research. The guidelines can help researchers report their methods and results transparently. The decision framework is a tool for implementing the reporting guidelines in the context of a Mantel-Haenszel analysis.

The [National Library of Medicine](https://www.ncbi.nlm.nih.gov/books) provides access to authoritative biomedical books and research-method references. These references can be used to verify the formulas and the assumptions of the Mantel-Haenszel method.

### The Role of the Decision Framework in the Research Process

The decision framework is not a substitute for the Mantel-Haenszel method. It is a tool for making the method more transparent and more reproducible. The framework is designed to be used in the context of a research project that follows the principles of good research practice.

The [Committee on Publication Ethics](https://publicationethics.org/core-practices) provides guidance on authorship, peer review, data handling, and conflicts of interest. The decision framework supports these principles by making the analysis decisions explicit and auditable.

The [NIH Data Management and Sharing Policy](https://sharing.nih.gov/data-management-and-sharing-policy) requires researchers to plan for the management and sharing of their data. The decision framework and the record system are part of the data management plan. The analysis decision log and the sensitivity analysis table should be shared with the data.

The [NIH Grants and Funding](https://grants.nih.gov/) policies include expectations for the rigor and transparency of the research methods. The decision framework is a tool for meeting these expectations.

The [ORCID](https://info.orcid.org/researchers) record should include the research outputs, including the analysis plan and the decision log. The ORCID record helps to ensure that the work is properly attributed and that the research records are complete.

### Practical Implementation Steps

The decision framework should be implemented in the following order.

**Step 1: Write the analysis plan.** The analysis plan should include the research question, the exposure, the outcome, the stratification variable, the number of strata, the stratum boundaries, the sparse data handling decision, the homogeneity test, the summary measure, and the sensitivity analysis plan.

**Step 2: Complete the decision log.** The decision log should be completed before the analysis is run. Each decision should be recorded with the rationale and the date.

**Step 3: Run the primary analysis.** The primary analysis should be run according to the analysis plan. The results should be recorded in the output log.

**Step 4: Run the sensitivity analysis.** The sensitivity analysis should be run according to the sensitivity analysis plan. The results should be recorded in the sensitivity analysis table.

**Step 5: Review the results.** The results should be reviewed against the decision framework. If the results are sensitive to the decisions, the researcher should consider whether the decisions are appropriate.

**Step 6: Report the results.** The results should be reported with the decision framework. The report should include the decision log, the stratum specification table, and the sensitivity analysis table.

### When to Escalate to a Biostatistician

The decision framework is designed to be used by researchers with a basic understanding of the Mantel-Haenszel method. However, some situations require the expertise of a biostatistician.

**Complex data structures.** When the data have a complex structure, such as multiple stratification variables or a hierarchical structure, a biostatistician should be consulted.

**Conflicting results.** When the sensitivity analysis produces conflicting results, a biostatistician should be consulted to help interpret the results.

**Unclear homogeneity.** When the homogeneity test is borderline or when the stratum-specific estimates are difficult to interpret, a biostatistician should be consulted.

**Unmeasured confounding.** When the researcher suspects that an unmeasured confounder is present, a biostatistician should be consulted to discuss the limitations of the analysis.

The decision framework is a practical tool for improving the quality and the transparency of a Mantel-Haenszel analysis. It is not a replacement for the method itself, but it is a way to ensure that the method is applied correctly and that the results are reported in a way that is useful to the reader.

## Frequently Asked Questions

### What is the difference between the Mantel-Haenszel test and the Mantel-Haenszel adjusted odds ratio?

The Mantel-Haenszel test is a test of association across strata, while the adjusted odds ratio is a measure of the association. The test provides a p-value, while the adjusted odds ratio provides an estimate of the effect size.

### How many strata can I use in a Mantel-Haenszel analysis?

The number of strata is limited by the sample size. Each stratum should have enough observations to produce stable estimates. A general rule is to have at least five observations in each cell of the two-by-two table.

### What is the difference between the Mantel-Haenszel method and logistic regression?

The Mantel-Haenszel method is a nonparametric method that does not require the same assumptions as logistic regression. Logistic regression can handle multiple confounders and continuous variables, while the Mantel-Haenszel method is limited to a single confounder or a small number of confounders.

### How do I interpret the homogeneity test result?

The homogeneity test assesses whether the stratum-specific effects are equal. If the test is significant, the effects are not equal, and the adjusted summary may not be appropriate.

### Can I use the Mantel-Haenszel method for a continuous outcome?

No, the Mantel-Haenszel method is designed for binary outcomes. For continuous outcomes, other methods such as linear regression should be used.

### What is the difference between the Mantel-Haenszel method and the Cochran-Mantel-Haenszel test?

The Cochran-Mantel-Haenszel test is a test of association across strata, while the Mantel-Haenszel adjusted odds ratio is a measure of the association. The test provides a p-value, while the adjusted odds ratio provides a point estimate.

### How do I report the results of a Mantel-Haenszel analysis?

The results should be reported with the stratum-specific estimates, the adjusted odds ratio, the confidence interval, and the homogeneity test result. The reporting should follow the guidelines for observational research.

### What is the role of the Mantel-Haenszel method in bioinformatics?

The Mantel-Haenszel method is used in bioinformatics to control for confounding variables in the analysis of categorical data. It is often used in the analysis of genomic data, where the confounding variables such as population structure or batch effects can bias the results.

## Related Bioinformatics Guides

- [Longitudinal Microbiome Data Analysis: Methods and Best Practices](/knowledge/bioinformatics/longitudinal-microbiome-data-analysis-methods-and-best-practices)
- [Genomic Data Analysis Tools: A Comparative Guide for Researchers](/knowledge/bioinformatics/genomic-data-analysis-tools-a-comparative-guide-for-researchers)
- [Metabolomics Data Analysis Workflow: From Raw Data to Biological Insight](/knowledge/bioinformatics/metabolomics-data-analysis-workflow-from-raw-data-to-biological-insight)
- [Metagenomics Data Analysis: From Raw Reads to Biological Insights](/knowledge/bioinformatics/metagenomics-data-analysis-from-raw-reads-to-biological-insights)
- [Proteomics Data Analysis Workflow: From Raw Spectra to Biological Insights](/knowledge/bioinformatics/proteomics-data-analysis-workflow-from-raw-spectra-to-biological-insights)

## References and Further Reading

- [Research Methods Resources](https://www.ncbi.nlm.nih.gov/books). National Library of Medicine.
- [EQUATOR Network](https://www.equator-network.org/). EQUATOR Network.
- [Core Practices](https://publicationethics.org/core-practices). Committee on Publication Ethics.
- [NIH Grants and Funding](https://grants.nih.gov/). National Institutes of Health.
- [ORCID for Researchers](https://info.orcid.org/researchers). ORCID.
- [Data Management and Sharing Policy](https://sharing.nih.gov/data-management-and-sharing-policy). National Institutes of Health.
- [NCBI Data Resources](https://www.ncbi.nlm.nih.gov/). National Center for Biotechnology Information.
- [EMBL-EBI Training](https://www.ebi.ac.uk/training). European Bioinformatics Institute.
- [LLDAS and remission attainment with anifrolumab treatment in patients with systemic lupus erythematosus: results from the TULIP and long-term extension randomised controlled trials.](https://pubmed.ncbi.nlm.nih.gov/39948001). Annals of the rheumatic diseases, 2025.
- [Ventilatory Assistance Before Umbilical Cord Clamping in Extremely Preterm Infants: A Randomized Clinical Trial.](https://pubmed.ncbi.nlm.nih.gov/38758557). JAMA network open, 2024.
- [Risk factors for invasive fungal infections after haematopoietic stem cell transplantation: a systematic review and meta-analysis.](https://pubmed.ncbi.nlm.nih.gov/38280518). Clinical microbiology and infection : the official publication of the European Society of Clinical Microbiology and Infectious Diseases, 2024.

> This article is educational and does not replace validated analysis plans, institutional policy, clinical interpretation, or specialist review.