cmh.test | R Documentation |

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)
```

`x` |
a numeric |

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.

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 |

`method` |
type of the performed test. |

`data.name` |
a character string giving the name of the data. |

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

`mantelhaen.test`

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.