Help with Mantel-Haenszel Stratified Analysis Using gtsummary for Case-Control Study

I’m currently practising case-control analysis and have successfully calculated odds ratios (ORs) and confidence intervals (CIs) using both GLM and chi-squared tests via the gtsummary package.

In my protocol, I’ve outlined that I will use Mantel-Haenszel stratified analyses to calculate adjusted odds ratios and examine interactions between variables for effect modification. Specifically, if the stratum-specific ORs differ significantly, indicating effect modification, I plan to conduct stratum-specific analyses.

However, I’m unsure how to implement Mantel-Haenszel stratified analysis within the gtsummary framework. Does anyone have experience or suggestions for how to perform this type of stratified analysis to calculate adjusted ORs and assess interactions between variables using gtsummary?

@abbie.harrison welcome and thanks for your post.

Do you have any code you wish to share for review?

@arranh or @aspina may be able to help with this.

Hello @abbie.harrison . I am not sure if {gtsummary} works for stratified análysis.

Maybe It will be better explore with the {EpiR} packed.

Best regards

Thank you for your reply! - I will check out the EpiR package. I was using
EpiStats::CCTable but it wasn’t behaving well with my data and was causing conflicts with other packages in my environment.

I did come across this thread, Adding strata to tables · Issue #679 · ddsjoberg/gtsummary · GitHub

Which seems to outline a small function, tbl_cmh() , to calculate the Cochran-Mantel-Haenszel OR and test wih stratified tables. I’m going to see if I can get this to work for my CC data and will share my code on this thread (if I get it working).

BW,

Abbie