Related Experiment Video
Updated: May 10, 2026

Heterogeneity Mapping of Protein Expression in Tumors using Quantitative Immunofluorescence
Published on: October 25, 2011
Tests of marginal homogeneity and special cases
1Strategic Staffing Solutions, St. Louis, MO, USA. dunnigan_k@yahoo.com
Abstract:
The analysis of two-way contingency tables is common in clinical studies. In addition to summary counts and percentages, statistical tests or summary measures are often desired. If the data can be viewed as two categorical measurements on the same experimental unit (matched pair data) then a test of marginal homogeneity may be appropriate. The most common clinical example is the so called 'shift table' whereby a quantity is tested for change between two time points. The two principal marginal homogeneity tests are the Stuart Maxwell and Bhapkar tests. At present, SAS software does not compute either test directly (for tables with more than two categories) and a programmatic solution is required. Two examples of programmatic SAS code are found in the current literature. Although accurate in most instances, they fail to produce output for certain tables ('special cases'). After summarizing the mathematics behind the two tests, a SAS macro is presented, which produces correct output for all tables. Finally, several examples are coded and presented with resultant output.
Related Concept Videos
Test for Homogeneity
Statistical Methods to Analyze Parametric Data: Student t-Test and Goodness-of-Fit Test
The Student's t-test is a statistical test that examines if there is a statistically significant difference between the means of two groups. This test is instrumental when dealing with data...
One-Way ANOVA: Equal Sample Sizes
Different sample means can result in different values for the variance estimate: variance between samples. This is because the variance between samples is calculated as the product of the sample size and the variance between the...
Significance Testing: Overview
One-Way ANOVA: Unequal Sample Sizes
Goodness-of-Fit Test
