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?
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.
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).