I have two datasets from genome-wide association studies. The only information available are the odd ratios and their confidence intervals (95%) for each genotyped SNP. My want to generate a forest plot comparing these two odds ratios, but I can't find the way to calculate the combined confidence intervals to visualize the summary effects. I used the program PLINK to perform the meta-analysis using fixed effects, but the program did not show these confidence intervals.

  • How can I calculate such confidence intervals?

The data available is:

  • Odd ratios for each study,
  • 95% confidence intervals and
  • Standard errors.

4 Answers 4


In most meta-analysis of odds ratios, the standard errors $se_i$ are based on the log odds ratios $log(OR_i)$. So, do you happen to know how your $se_i$ have been estimated (and what metric they reflect? $OR$ or $log(OR)$)? Given that the $se_i$ are based on $log(OR_i)$, then the pooled standard error (under a fixed effect model) can be easily computed. First, let's compute the weights for each effect size: $w_i = \frac{1}{se_i^2}$. Second, the pooled standard error is $se_{FEM} = \sqrt{\frac{1}{\sum w}}$. Furthermore, let $log(OR_{FEM})$ be the common effect (fixed effect model). Then, the ("pooled") 95% confidence interval is $log(OR_{FEM}) \pm 1.96 \cdot se_{FEM}$.


Since BIBB kindly provided the data, I am able to run the 'full' meta-analysis in R.

or <- c(0.75, 0.85)
se <- c(0.0937, 0.1029)
logor <- log(or)
(or.fem <- metagen(logor, se, sm = "OR"))

> (or.fem <- metagen(logor, se, sm = "OR"))
    OR            95%-CI %W(fixed) %W(random)
1 0.75  [0.6242; 0.9012]     54.67      54.67
2 0.85  [0.6948; 1.0399]     45.33      45.33

Number of trials combined: 2 

                         OR           95%-CI       z  p.value
Fixed effect model   0.7938  [0.693; 0.9092] -3.3335   0.0009
Random effects model 0.7938  [0.693; 0.9092] -3.3335   0.0009

Quantifying heterogeneity:
tau^2 < 0.0001; H = 1; I^2 = 0%

Test of heterogeneity:
    Q d.f.  p.value
 0.81    1   0.3685

Method: Inverse variance method


See, e.g., Lipsey/Wilson (2001: 114)

  • $\begingroup$ Thank you very much for your response. The standard erros are based on the natural Log of the OR Ln(ORi). First I compute the weights for SE1(0.0937)= 10.67 and for SE2(0.1029)= 9.71. So the computed SE under FEM is = 0.2215 . The pooled OR for these SNPs is = 0.7645, so the 95% confidence intervals are = (0.515-1.228). Am I correct??, if I do, I am worried because when I compare all results in a Forest plots, the combined intervals are too large compared with the originals in each study = study 1 = 95%CI(0.63-0.91) OR = 0.75, study 2 95%CI(0.69-1.04) OR = 0.85. It's everything ok?. Thanks $\endgroup$
    – BIBB
    Apr 13, 2011 at 21:59
  • $\begingroup$ No, unfortunately not. Please note that my formula for $w$ was wrong, it is $1/(se^2)$ not $1/se$. As you can see, the 'pooled' 95% CI is [0.693; 0.9092]. I also wonder why your pooled OR is different (0.7645 vs 0.7938). Sorry, I have to go but I come back to it tomorrow... $\endgroup$ Apr 13, 2011 at 22:30
  • $\begingroup$ Thank you very much!!!, that result is more consistent than mine. The pooled OR I give to you was in the PLINK output... now I'm very concerned about all my meta-analysis results... I'd better use R. $\endgroup$
    – BIBB
    Apr 13, 2011 at 22:48
  • $\begingroup$ I included a link to the Lipsey/Wilson book "Practical meta-analysis" (see References). I am a bit worried that PLINK's and my results differ. Do you know what meta-analysis methodology they use? You also should take into account that I have absolutely no idea about "genome-wide association studies". $\endgroup$ Apr 14, 2011 at 12:49
  • $\begingroup$ Thanks for the solution, I am wondering if I can apply the meta-analysis method to my problem. What I do, is simulate a regression by inducing some noise. I run the analysis n times (say n is 500) and obtain n ORs and CI. Here is the link to the question: stats.stackexchange.com/questions/206042/…. So can I implement the ´metagen´ function calling upon each log ORs and std errs. Is bias introduced with greater values of n $\endgroup$
    – lukeg
    Apr 11, 2016 at 14:13

Actually, you could use software like METAL which is specifically designed for meta-analyses in GWA context.

It's awkward that plink doesn't give the confidence interval. However, you can get the CI because you have the final OR (take $\log(\text{OR})$) and the $p$-value (hence the $z$) for the fixed effect.

Bernd's method is even more precise.

Beware that I would be more worried about the effect direction as it looks like you only have summary stats for each study but nothing to be sure which is the OR allele. Unless you know it is done on the same allele.



This is a comment (don't have enough rep. points). If you know the sample size (#cases and #controls) in each study, and the odds ratio for a SNP, you can reconstruct the 2x2 table of case/control by a/b (where a and b are the two alleles) for each of the two studies. Then you can just add those counts to get a table for the meta-study, and use this to compute the combined odds-ratio and confidence intervals.

  • $\begingroup$ Thank you for your answer. Unfortunately, I don't have the allele frequencies or counts, the authors did not show these data, they just put the SNP ID, OR and Confidence intervals (95%). I just extracted the SE value from each study, but I don't now to combine them (SE or CI)!!!! help!! $\endgroup$
    – BIBB
    Apr 12, 2011 at 23:52
  • $\begingroup$ Oh, you're right - one more degree of freedom is needed here. Usually the authors give the allele freq. (sometimes buried in supp. info.). If not, you may find it from an external source like hapmap (assuming the GWAS was done on a similar population). Another idea: the confidence interval itself can tell you the allele freq. All else being equal (sample size and OR), SNPs with low allele freq. have fewer carriers in both groups, hence a wider confidence interval. You can try different allele freqs., compute confidence interval for each one, and get the allele freq. matching what was reported $\endgroup$
    – Or Zuk
    Apr 13, 2011 at 0:21
  • $\begingroup$ I will try to do that, but in the meantime I'm curious about how PLINK can compute the pooled OR only with this parameters:SNP idenitifier, OR Odds ratio (or BETA, etc) and SE Standard error of OR (or user-defined weight field). You can realize that PLINK did't ask for allele frequencies... so there is a way to perform this... $\endgroup$
    – BIBB
    Apr 13, 2011 at 0:33

Here is code to get CIs for meta-analysis as in PLINK:

getCI = function(mn1, se1, method){
    remov = c(0, NA)
    mn    = mn1[! mn1 %in% remov]
    se    = se1[! mn1 %in% remov]
    vars  <- se^2
    vwts  <- 1/vars

    fixedsumm <- sum(vwts * mn)/sum(vwts)
    Q         <- sum(((mn - fixedsumm)^2)/vars)
    df        <- length(mn) - 1
    tau2      <- max(0, (Q - df)/(sum(vwts) - sum(vwts^2)/sum(vwts)) )

    if (method == "fixed"){ wt <- 1/vars } else { wt <- 1/(vars + tau2) }

    summ <- sum(wt * mn)/sum(wt)
    if (method == "fixed") 
         varsum <- sum(wt * wt * vars)/(sum(wt)^2)
    else varsum <- sum(wt * wt * (vars + tau2))/(sum(wt)^2)

    summtest   <- summ/sqrt(varsum)
    df         <- length(vars) - 1
    se.summary <- sqrt(varsum)
    pval       = 1 - pchisq(summtest^2,1)
    pvalhet    = 1 - pchisq(Q, df)
    L95        = summ - 1.96*se.summary
    U95        = summ + 1.96*se.summary
    # out = c(round(c(summ,L95,U95),2), format(pval,scientific=TRUE), pvalhet)   
    # c("OR","L95","U95","p","ph")
    # return(out)

    out = c(paste(round(summ,3), ' [', round(L95,3), ', ', round(U95,3), ']', sep=""),
            format(pval, scientific=TRUE), round(pvalhet,3))
    # c("OR","L95","U95","p","ph")

Calling R function:

getCI(log(plinkORs), plinkSEs)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.