1

我正在尝试用 R 进行荟萃分析。使用包 meta 中的函数 metabin 后,我得到 了这个

这是我的数据的简化版本:

data <- data.frame(matrix(rnorm(40,25), nrow=17, ncol=8))
centres<-c("LYON","SAINT  ETIENNE","REIMS","TOULOUSE","SVP","NANTES","STRASBOURG","GRENOBLE","ANGERS","TOULON","MARSEILLE","COLMAR","BORDEAUX","RENNES","VALENCE","CAEN","NANCY")
rownames(data) = centres
colnames(data) = c("case_exposed","witness_exposed","case_nonexposed","witness_nonexposed","exposed","nonexposed","case","witness")
metabin( data$case_exposed, data$case, data$witness_exposed, data$witness, studlab=centres,
       data=data, sm="OR")

我只想在固定效应模型和随机效应模型中提取 OR 和 95%-CI 的值,所以我可以将它们放在另一个数组中。无论如何这是可能的吗?

我尝试使用摘要,但它没有改变任何东西。谢谢你的帮助。

4

1 回答 1

1

考虑以下示例:

library(meta)
data(Olkin95)
meta1 <- metabin(event.e, n.e, event.c, n.c,
                 data = Olkin95, subset = c(41, 47, 51, 59),
                 method = "Inverse")
summary(meta1)

来自固定和随机模型的估计 RR(具有 95% CI)是

Number of studies combined: k = 4

                         RR           95%-CI     z  p-value
Fixed effect model   0.4407 [0.2416; 0.8039] -2.67   0.0075
Random effects model 0.4434 [0.2038; 0.9648] -2.05   0.0403

您可以使用以下方法提取这些值:

(est.fixed <- unlist(summary(meta1)$fixed))

          TE         seTE        lower        upper            z            p        level 
-0.819414226  0.306710201 -1.420555173 -0.218273278 -2.671623649  0.007548526  0.950000000

(RR.fixed <- exp(est.fixed[1]))

       TE 
0.4406897 

(CI.fixed <- exp(c(est.fixed[1]-1.96*est.fixed[2],est.fixed[1]-1.96*est.fixed[2])))

       TE        TE 
0.2415772 0.2415772

同样对于随机效应模型:

(est.random <- unlist(summary(meta1)$random))
         TE        seTE       lower       upper           z           p       level          df 

-0.81325423  0.39665712 -1.59068790 -0.03582057 -2.05027011  0.04033808  0.95000000          NA 

(RR.random <- exp(est.random[1]))

       TE 
0.4434127 

(CI.random <- exp(c(est.random[1]-1.96*est.random[2],est.random[1]+1.96*est.random[2])))

       TE        TE 
0.2037825 0.9648272
于 2017-05-04T14:34:30.603 回答