Mantel-Haenszel odd ratios

Skip to first unread message

Sara Fung

Dec 6, 2012, 10:20:29 PM12/6/12
Dear all, recently I have tried a package "lawstat", the Mantel-Haenszel odds ratio test "cmh.test() returned like this:

    Cochran-Mantel-Haenszel Chi-square Test
  data:  myarray
  CMH statistic = 40.512, df = 1.000, p-value = 0.000,
  MH Estimate = 23.001,
  Pooled Odd Ratio = 25.550,
  Odd Ratio of level 1 = 16.480,
  Odd Ratio of level 2 = 28.667

My question is how to interpret between MH odds ratio and  Pooled odds ratio?  Thank you very much.

Chung-hong Chan

Dec 6, 2012, 11:02:59 PM12/6/12
to, Sara SL Fung
Welcome to the list, but I don't think that a lot of people will read your question.

Let's use the built-in UCBAdmissions data (?UCBAdmissions for detail of this dataset), very famous example of Simpson's paradox.


The pooled OR is actually the OR calculated by collapsing the Dept level data. (i.e. your third variable, or Strata) As you can see the pooled OR is significantly larger than 1. Indicated UCB admit boys more (in general).

It is the same as

fisher.test(UCBAdmissions[,,1] + UCBAdmissions[,,2] + UCBAdmissions[,,3] + UCBAdmissions[,,4] + UCBAdmissions[,,5] + UCBAdmissions[,,6])

While the MH OR adjusted for Dept level, the OR is now 0.9. The pooled OR and the MH OR is not the same, indicated the Strata variable is correlated with your exposure variable. i.e. it is a confounding factor.

p.s. the built-in mantelhaen.test() can return the 95% CI of MH Odds ratio. I like it more.


Sara Fung

Dec 7, 2012, 12:15:24 AM12/7/12
to, Sara SL Fung
Yes I'm back, I dedicated this Christmas month to renew my R knowledge and to compare its usefulness with SPSS 14.0 and mintab 16.  
I intended to post question here instead of other ways (you know) in the hope of drawing local R users together and I sincerely long for future meetings.

Hong, thank you for your suggestion, mantelhaen.test() is great for it provides CI and if you find the crude ORs confusing. BTW, for the susceptibility of being a confounder, would you suggest any build-in homogeneity test like Tarone's test in 'lawstat'? 


Chung-hong Chan

Dec 7, 2012, 4:19:36 AM12/7/12
to, Sara SL Fung
If lwstat does the job, why ditch it. 
But anyway you can actually remap your k * 2 * 2 table type of question into different way

1. loglinear model

require(MASS) #built-in
fm.loglm <- glm(Freq~Dept*Admit+Gender*Admit+Dept*Gender,, family=poisson)
summary(fm.loglm) #AdmitRejected:GenderFemale is not sig, but both Dept*Admit and Dept*Gender are sig.

2. Meta-analysis and check for heterogeneity

require(metafor) # not built-in[1,1,], bi=UCBAdmissions[1,2,], ci=UCBAdmissions[2,1,], di=UCBAdmissions[2,2,]) # socalled fixed effect
rma.uni(ai=UCBAdmissions[1,1,], bi=UCBAdmissions[1,2,], ci=UCBAdmissions[2,1,], di=UCBAdmissions[2,2,], measure="OR") #random effect

Sara Fung

Dec 7, 2012, 9:00:47 PM12/7/12
to, Sara SL Fung
Yes thank you

I tried, but your code is rather neat and simple, so does the rma.uni (glm will be my next subject).

Reply all
Reply to author
0 new messages