[英]Meta-analysis from odds ratios and confidence intervals, using metafor package in r
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 = " "
). 为了使用
rma.uni()
从metafor
包,我需要供给方差(通过vi=" "
)或标准误差(throuh sei = " "
)。 So I calculated the standard errors in the following way (logor = log(odds ratio), UL= CI upper limit, LL = CI lower limit)
: 因此,我通过以下方式计算标准误差
(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.
我认为这是由于CI被作者四舍五入的缘故。 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)
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. 您可以使用
forest.default()
函数,直接供应CI界限,然后用添加摘要多边形addpoly()
函数。 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. 将确保数据集中的CI边界与森林图中的CI边界完全相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.