Heterogeneity calculation based on odds ratios and confidence intervals


I wonder if you might be able to help with testing for heterogeneity (Cochran's q or I-squred) in meta-analysing genotypic odds ratios in two groups from two different genetic associations studies of the same phenotype. (This question pertains to genetics, but the principle, I believe, is generic).

The numbers that follow are for illustrative purposes:

In Group A, the effect of allele X on the phenotype is: odds ratio 1.07 (95% CI 1.01-1.14), N=4000 samples
In Group B, the effect of the same allele X on the phenotype is: odds ratio 1.10 (95% CI 1.05 1.08-1.12), N=20,000 samples
(I also have the effect sizes in the form of beta coefficients, standard errors and p-values).

I want to test for heterogeneity in the effect of allele X on the phenotype between groups A and B by calculating either Cochran's q or I-squared. I've scoured the internet for how to do this in R (or any other platform), and all the software that I've come across requires me to input the raw data, and I haven't found anything that can work out the heterogeneity based on the summary statistics that I have. Is it even possible?

Thank you very much for your advice.

Hi. The phenotype was binary. The OR were derived from beta and SE, taking into account case/control fraction. Don't know about other varaibles/covariates in these two studies. Can I test for heterogeneity based on these summary stats alone?


Not a robit
I was going to recommend just simulating data and using those, but if the models controlled for other variables the estimates are conditional on covariates - so it isn't a straightforward process. I would imagine you are not in a unique position asking this question, so I would keep searching. But even if you find heterogeneity that would mean you run random effects with two studies which feels a little weird with random effects, which many people recommend multiple groups. Sorry I am not of more help.