CMHTEST procedure

Performs the Cochran-Mantel-Haenszel test (D.A. Murray).


Options

PRINT = string
Controls printed output (test); default test

CLASSIFICATION = factors
Classifying factors for a DATA variate or classifying factors for the R×C tables in a DATA table

CONTINUITY = string
Continuity correction for 2×2×K Mantel-Haenszel test (correct, none); default corr

CIPROBABILITY = scalar
Size of confidence interval for common odds ratio in 2×2×K tables; default 0.95


Parameters

DATA = tables or variates
Data values

STATISTIC = scalars
Save the test statistic

PROBABILITY = scalars
Save the probability for the test

ODDSRATIO = scalars
Save the common odds ratio for the 2×2×K table case

LOWER = scalars
Save lower limit of the confidence interval of odds ratio

UPPER = scalars
Save upper limit of the confidence interval of odds ratio


Description

CMHTEST performs the Cochran-Mantel-Haenszel test for average partial association between two nominal variables adjusting for control variables. The data are represented by a series of K (R×C) contingency tables, where K represents the strata for the control variables. If there are two or more control variables then these are combined to form a single factor (K) with a level for every combination of the control factors. For the case where there are two dichotomous variables of interest, i.e. a series of K (2×2) tables, CMHTEST calculates the Mantel-Haenszel chi-square statistic, and an overall estimate of relative risk as described in Mantel & Haenszel (1959). Otherwise the Generalized Cochran-Mantel-Haenszel test is used, as in Landis et al. (1978).

   The data can be supplied as a table using the DATA parameter where the first two classifying factors of the table indicate the variables of interest, and the remaining factors are combined to form a factor with a level for every combination of the remaining factors. If the first two classifying factors are not the ones of interest, then the CLASSIFICATION option can be used to supply the names of the classifying factors to use. The data can also be supplied in variates, with the CLASSIFICATION option set to the classifying factors and the first two factors in the list indicating the variables of interest. For a series of K (2×2) tables the CONTINUITY option can be used to control whether to apply a continuity correction to the Mantel-Haenszel chi-square test.

   The PRINT option controls printed output, with settings:

    test
the test statistic and probability, also the common odds ratio and confidence interval when there are K (2×2) tables

   A 95% confidence interval is calculated for the common odds ratio, but this can be changed by setting the CIPROBABILITY option to the required value (between 0 and 1).

   The test statistic can be saved using the STATISTIC parameter, and the probability can be saved using the PROBABILITY parameter. For a series of K (2×2) tables the odds ratio, lower and upper odds-ratio confidence interval can be saved with the ODDSRATIO, LOWER and UPPER parameters respectively.

 

Options: PRINT, CLASSIFICATION, CONTINUITY, CIPROBABILITY.

Parameters: DATA, STATISTIC, PROBABILITY, ODDSRATIO, LOWER, UPPER.


Method

For each table i, i = 1...K


ai

bi

n1i

ci

di

n2i

m1i

m2i

Ni


the Mantel-Haenszel Test is calculated by:

MH = ( |( ∑ ai - ∑((n1i × m1i) / Ni) )| - 0.5 )2

/ ∑( (n1i × n2i × m1i × m2i) / (Ni2 × (Ni- 1)) )

where the continuity correction (0.5) is used if option CONTINUITY=correct. The common odds-ratio is calculated by

OR = ∑i=1 to K Ri / ∑i=1 to K Si

where

Ri = (ai × di) / Ni

Si = (bi × ci) / Ni

The variance for the odds-ratio is estimated using the method outlined in Robins et al. (1986).

   The Generalized Cochran-Mantel-Haenszel test is calculated using the method of Landis et al. (1978).


Action with RESTRICT

If a parameter is restricted the statistics will be calculated using only those units included in the restriction.


References

Landis J,L., Heyman, E,R. & Koch, G.G. (1978). Average Partial Association in Three-way Contingency Tables: a Review and Discussion of Alternative Tests. International Statistical Review, 46, 237-254.

Mantel N. & Haenszel W. (1959). Statistical Aspects of the Analysis of Data From Retrospective Studies of Disease. Journal National Cancer Institute, 22(4), 719-748.

Robins J, Breslow N, & Greenland S. (1986). Estimators of the Mantel-Haenszel variance consistent in both sparse data and large-strata limiting models. Biometrics, 42, 311-323.