Performs Mantel-Haenszel's test for k strata of 2x2 tables.
Mantel and Haenszel proposed this asymptotic test based on the chi-2 distribution. Assuming no three-way interaction (k independent strata).
Ref.: DeltaProt toolbox at http://services.cbu.uib.no/software/deltaprot/
X: data matrix (size 2x2xK) of the observed frequency cells, (a,b,c,d) for each stratum k.
tail: desired test ('lt' or 'gt': one-tail; 'ne': two-tailed(default)).
Use: P = MantelHaenTest(Observed,'ne')
Each stratum k must be a 2x2 table design such as:
Sample-1: a b
Sample-2: c d
The test has low power for small strata sizes, and one should limit the use to situations where expected cell counts of at least 5 in most of the cells in each stratum (Reis et al. 1999).
The null hypothesis specifies that the success probabilities are equal from stratum to stratum.
In each stratum the two rows can be viewed as data from two independent binomial distributions. If these two probabilities goes in one direction in one strata, and in the oposite direction in other strata, the test will have less power (less ability to detect a false null hypothesis).
Please, use the following reference:
Thorvaldsen, S. , Flå, T. and Willassen, N.P. (2010) DeltaProt: a software toolbox for comparative genomics. BMC Bioinformatics 2010, Vol 11:573.
Mantel, N. and Haenszel, W. (1959): Statistical aspects of the analysis of data from retrospective studies of disease. J. National Cancer Inst., 22:719-748.
Hollander, M. and Wolfe, D.A. (1999): Nonparametric Statistical Methods. John Wiley & Sons.
Reis, I.M et al. (1999): Exact and asymptotic tests for homogenity in several 2x2 tables. Statistics in Medicine, 18, p. 893-906.
Steinar Thorvaldsen (2022). Mantel-Haenszel's test (https://www.mathworks.com/matlabcentral/fileexchange/29820-mantel-haenszel-s-test), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!