Cochran-Mantel-Haenszel chi-squared test of conditional independence in a set of contingency tables, one per stratum. Equivalent to R's mantelhaen.test(). Takes the strata as R takes a three-dimensional array.
mantelhaen.test()
The K strata, each an I x J table of counts as an array of rows (all of the same shape; I, J >= 2, K >= 2 for the asymptotic test).
See MantelhaenTestOptions.
const r = mantelhaenTest([ [[10, 5], [4, 12]], [[8, 6], [5, 9]], [[12, 4], [6, 10]],]);r.statistic; // 8.972595458903124r.pValue; // 0.002740590103473906r.estimate; // 4.13218122372723 (common odds ratio) Copy
const r = mantelhaenTest([ [[10, 5], [4, 12]], [[8, 6], [5, 9]], [[12, 4], [6, 10]],]);r.statistic; // 8.972595458903124r.pValue; // 0.002740590103473906r.estimate; // 4.13218122372723 (common odds ratio)
Cochran-Mantel-Haenszel chi-squared test of conditional independence in a set of contingency tables, one per stratum. Equivalent to R's
mantelhaen.test(). Takes the strata as R takes a three-dimensional array.