The Cochran--Mantel--Haenszel (CMH) procedure tests homogeneity of population proportions after taking into account other factors. This procedure is widely used in law cases, for example, on equal employment and discrimination, and in biological and phamaceutical studies.
cmh.test(x)
a numeric \(2 \times 2 \times k\) array of data values.
A list of class "htest"
containing the following components:
the value of the Cochran--Mantel--Haenszel estimate.
pooled Odd Ratio of the data.
vector of Odd Ratio of each level.
the test statistic.
degrees of freedom.
the \(p\)-value of the test.
type of the performed test.
a character string giving the name of the data.
The test is based on the CMH procedure discussed by Gastwirth_1984;textuallawstat. The data should be input in an array of 2 rows \(\times\) 2 columns \(\times\) \(k\) levels. The output includes the Mantel--Haenszel Estimate, the pooled Odd Ratio, and the Odd Ratio between the rows and columns at each level. The Chi-square test of significance tests if there is an interaction or association between rows and columns.
The null hypothesis is that the pooled Odd Ratio is equal to 1, i.e., there is no interaction between rows and columns. For more details see Gastwirth_1984;textuallawstat.
The cmh.test
can be viewed as a subset of
mantelhaen.test
, in the sense that cmh.test
is for a
2 by 2 by \(k\) table without continuity correction, whereas
mantelhaen.test
allows for a larger table,
and for a 2 by 2 by \(k\) table, it has an option of performing continuity correction.
However, in view of Gastwirth_1984;textuallawstat, continuity
correction is not recommended as it tends to overestimate the \(p\)-value.
# NOT RUN {
## Sample Salary Data
data(blackhire)
cmh.test(blackhire)
# }
Run the code above in your browser using DataLab