You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 .
General Information
- Version 1.0.0.0 (4.14 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | Text was improved. |
