rr-forestplotmetafor

95% confidence intervals and SE calculated by meta package are different from the original data


My wish is to use the meta r package's forest fucntion for presenting the OR and 95% confidence intervals in a forest plot. It is a non-meta-analysis task. However, the supplied confidence intervals are changed when they are plotted in a forest plot. As an example, you can see the following

 forest(metagen(
  TE = c(0.58, 0.04,0.26, 0.92, 0.3),
  lower = c(0.21,0.02,0.16, 0.64, 0.0),
  upper = c(1.59,0.08,0.42, 1.32, 1.2),
  overall = F, random = F,
  fixed=F,
  sm = "OR"))

I get the following plot after running the above code. enter image description here As you can see the calculated seTE (Standard error) is different from the one you would get using the formula SE = (upper limit – lower limit) / 3.92 and the confidence intervals are different from the ones I supplied in the lower and upper limit of my code above. It looks like metagen function of the meta r package calculates SE using the following formula: SE = sqrt(Q / df). That seems I shouldn't use meta r package for vizualizing odds ratios and confidence intervals for non-meta-analysis taks. Is it possible to force it using the supplied confidence intervals or force it calculate using this: SE = (upper limit – lower limit) / 3.92


Solution

  • You need to pass the log-transformed odds ratios and CI bounds to the function:

    forest(metagen(
      TE = log(c(0.58, 0.04,0.26, 0.92, 0.3)),
      lower = log(c(0.21,0.02,0.16, 0.64, 0.0)),
      upper = log(c(1.59,0.08,0.42, 1.32, 1.2)),
      overall = F, random = F,
      fixed=F,
      sm = "OR"))