cmh.test: The Cochran-Mantel-Haenszel Chi-square Test

View source: R/cmh.test.R

cmh.testR Documentation

The Cochran–Mantel–Haenszel Chi-square Test

Description

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.

Usage

cmh.test(x)

Arguments

x

a numeric 2 \times 2 \times k array of data values.

Details

The test is based on the CMH procedure discussed by \insertCiteGastwirth_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 \insertCiteGastwirth_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 \insertCiteGastwirth_1984;textuallawstat, continuity correction is not recommended as it tends to overestimate the p-value.

Value

A list of class "htest" containing the following components:

MH.ESTIMATE

the value of the Cochran–Mantel–Haenszel estimate.

OR

pooled Odd Ratio of the data.

ORK

vector of Odd Ratio of each level.

cmh

the test statistic.

df

degrees of freedom.

p.value

the p-value of the test.

method

type of the performed test.

data.name

a character string giving the name of the data.

Author(s)

Min Qin, Wallace W. Hui, Yulia R. Gel, Joseph L. Gastwirth

References

\insertAllCited

See Also

mantelhaen.test

Examples

## Sample Salary Data
data(blackhire)
cmh.test(blackhire)


lawstat documentation built on April 6, 2023, 1:06 a.m.

Related to cmh.test in lawstat...