I have the following mock data set that I created specifically to test association between two categorical variables (X = BIOMARKER, Y = RESPONSE, Freq = FREQ), grouped by a third categorical variable = ARM
| ARM | BIOMARKER | RESPONSE | FREQ |
| PBO | BM- | NR | 25 |
| PBO | BM- | R | 25 |
| PBO | BM+ | NR | 21 |
| PBO | BM+ | R | 29 |
| ACTIVE | BM- | NR | 38 |
| ACTIVE | BM- | R | 12 |
| ACTIVE | BM+ | NR | 20 |
| ACTIVE | BM+ | R | 30 |
When I perform the X by Y contigency analysis followed by CMH test, I get the following result:
| Cochran-Mantel-Haenszel Tests |
| Stratified by | | |
| ARM | | | |
| | | | |
| | | | |
| CMH Test | ChiSquare | DF | Prob>Chisq |
| Correlation of Scores | 9.739 | 1 | 0.0018 |
| Row Score by Col Categories | 9.739 | 1 | 0.0018 |
| Col Score by Row Categories | 9.739 | 1 | 0.0018 |
| General Assoc. of Categories | 9.739 | 1 | 0.0018 |
But when I try the reciprocal analysis where X = ARM, Y = RESPONSE, and Freq = FREQ, grouped by BIOMARKER, I get a different result:
| | | | |
| | | | |
| Cochran-Mantel-Haenszel Tests |
| Stratified by | | |
| BIOMARKER | | |
| | | | |
| | | | |
| CMH Test | ChiSquare | DF | Prob>Chisq |
| Correlation of Scores | 3.0013 | 1 | 0.0832 |
| Row Score by Col Categories | 3.0013 | 1 | 0.0832 |
| Col Score by Row Categories | 3.0013 | 1 | 0.0832 |
| General Assoc. of Categories | 3.0013 | 1 | 0.0832 |
| | | | |
Clearly, I'm not understanding the mechanic of the CMH analysis because I would have expected to get the same results either way.
Also, in this example, there is only contrast in BIOMARKER in the ACTIVE group (by design) but I unsure how to calculate the p value for each ARM (beside using the "By" option).
Thanks