Contradicting p-value and confidence interval in the Mantel-Haenzsel Test [R-Code]

47 Views Asked by At

This is a part of the appendix to a past paper I have but it is just essentially R-Code.

For the Mantel-Haenszel test, the p-value is greater than 5% so I would Fail To Reject the null hypothesis that there is no partial association at any level of the third variable.

However, the 95% confidence interval [0.530 090 09, 0.998 165 1] does not contain 1. Although it almost does. It seems that I would Reject the null hypothesis.

Am I interpreting this correctly? I can see that it does not seem to be very significant at a 5% level but I wouldn't expect the test to lead to different conclusions. enter image description here

enter image description here