4

I'm trying to do a meta-analysis from a number of Odds ratios and their confidence intervals. The source articles do not report standard errors.

In order to use rma.uni() from the metafor package, I need to supply variances (through vi=" ") or standard errors (throuh sei = " "). So I calculated the standard errors in the following way (logor = log(odds ratio), UL= CI upper limit, LL = CI lower limit):

se1<-(log(UL)-logor)/1.96
se2<-(log(OR)-log(LL))/1.96

My problem is, the standard errors derived in this way differ a little bit, although they should be the same. I think this is due to the fact that the CI's were rounded by the authors. My solution was to take the average of these as the standard errors in the model.

However when I fit the model and plot the forest plot, the resulting confidence intervals differ quite a bit from the ones I started with..

dmres<-rma.uni(yi=logor, sei=se, data=dm2)
forest(dmres, atransf=exp, slab=paste(dm2$author))

Is there a better way to do this? Maybe a function that I can put confidence intervals in directly?

Thanks a lot for your comments.

Update

Example data and code:

dm<-structure(list(or = c(1.6, 4.4, 1.14, 1.3, 4.5), cill = c(1.2, 
2.9, 0.45, 0.6, 3.2), ciul = c(2, 6.9, 2.86, 2.7, 6.1)), .Names = c("or", 
"cill", "ciul"), class = "data.frame", row.names = c(NA, -5L))

dm$logor<-log(dm$or)
dm$se1<-(log(dm$ciul)-dm$logor)/1.96
dm$se2<-(dm$logor-log(dm$cill))/1.96
dm$se<-(dm$se1+dm$se2)/2

library(metafor)
dmres<-rma.uni(yi=logor, sei=se, data=dm)
forest(dmres, atransf=exp)
eva_utrecht
  • 95
  • 1
  • 2
  • 6
  • 1
    Without some sample data that reproduces this problem, it's difficult to help you out. See [this question]{http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Thomas Jul 03 '13 at 11:06

1 Answers1

3

Since the confidence interval bounds (on the log scale) are not symmetric to begin with, you get these discrepancies. You can use the forest.default() function, supplying the CI bounds directly and then add the summary polygon with the addpoly() function. Using your example:

forest(dm$logor, ci.lb=log(dm$cill), ci.ub=log(dm$ciul), atransf=exp, rows=7:3, ylim=c(.5,10))
addpoly(dmres, row=1, atransf=exp)
abline(h=2)

will ensure that the CI bounds in the dataset are exactly the same as in the forest plot.

Wolfgang
  • 2,810
  • 2
  • 15
  • 29