StuMaxtest

Stuart-Maxwell's Test for Marginal Homogeneity.
2.1K Downloads
Updated 28 Jan 2005

View License

This file performs the Stuart-Maxwell's test for all the marginal homogeneity (i.e. across all the categories simultaneously) for each of the two sample times (nominal samples). Obviously, it need a square KxK table.

It is a non-parametric statistical test. The test was proposed by Stuart (1955), Maxwell (1970) and Everitt (1977).

Stuart-Maxwell's test is asymptotically equivalent to the Bhapkar's test by a n-times value. This because the Bhapkar's test works with the marginal probabilities for category i.

Stuart and Maxwell's test interpreted as a Chi-squared value with degrees of freedom df equal to K - 1. In the case of K = 2, the Stuart-Maxwell statistic and the McNemar statistic are identically equal.

The null hypothesis is stated that the proportion of ordinal values in sample time 2 is equal to the proportion of ordinal values in sample time 1.

This m-file needs to input X-data matrix defined by the KxK observed frequency cells, t-desired test [t = 1, one-tail; t = 2, two-tail (default)], and alpha-significance level (default = 0.05).

The output is a table with the SM statistic, number of categories, degrees of freedom and the P-values.

Cite As

Antonio Trujillo-Ortiz (2026). StuMaxtest (https://www.mathworks.com/matlabcentral/fileexchange/6367-stumaxtest), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0

Text was improved.