简体   繁体   English

使用优势比比较亚组荟萃分析的比例

[英]Compare proportions of subgroup meta-analysis using Odds ratios

I have performed a random effect meta-analysis of proportions using metaprop from the meta package.我使用meta package 中的 metaprop 对比例进行了随机效应荟萃分析。 I would like to compare the proportions of group A vs group B using odds ratios and 95% confidence intervals as in the example below.我想使用优势比和 95% 置信区间来比较group A group B组的比例,如下例所示。 Is there a way to do this?有没有办法做到这一点?

I found this link http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates but it didn't answer my question.我找到了这个链接http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates但它没有回答我的问题。

Without writing new code, you can just use the functionality that is already available:无需编写新代码,您只需使用已有的功能即可:

library(metafor)

df <- structure(list(study_nr = c(1, 4, 5, 6, 7, 8, 9, 10, 
                                  11, 14, 15, 18, 19, 20), 
                         group = c("A", "A", "A", "A", "A", "A", "A", 
                                   "A", "A", "B", "B", "B", "B", "B"), 
                         n_tot = c(1190, 37, 47, 26, 300, 402, 405, 
                                   195, 89, 47, 93, 49, 227, 61), 
                         n_event = c(189,2, 1, 0, 21, 11, 1, 
                                     8, 4, 2, 21, 4, 13, 5)), 
                    class = c("tbl_df", "tbl", "data.frame"), 
                    row.names = c(NA, -14L))
df

# compute log(odds) and corresponding sampling variances
df <- escalc(measure="PLO", xi=n_event, ni=n_tot, data=df)
df

# fit meta-regression model with 'group' as moderator
res <- rma(yi, vi, mods = ~ group, data=df, method="DL")
res

# obtain the OR and 95% CI
predict(res, newmods=1, intercept=FALSE, transf=exp, digits=2)

# test if the log(OR) is significantly different from 0
anova(res, L=c(0,1), transf=exp, digits=2)

I think I have found the answer, which I will post here in case someone has the same question in the future.我想我已经找到了答案,我会在这里发布,以防将来有人有同样的问题。

It is actually pretty easy, we just need to exponentiate the the logit-tranformed estimates obtained from the metaprop or the metaregression object to obtain Odds ratios:这实际上很简单,我们只需要对从 metaprop 或 metaregression object 获得的 logit 转换估计取幂即可获得 Odds ratios:

    library(metafor)
    library(meta) 
    library(dplyr)

    df <- structure(list(study_nr = c(1, 4, 5, 6, 7, 8, 9, 10, 
                                      11, 14, 15, 18, 19, 20), 
                         group = c("A", "A", "A", "A", "A", "A", "A", 
                                   "A", "A", "B", "B", "B", "B", "B"), 
                         n_tot = c(1190, 37, 47, 26, 300, 402, 405, 
                                   195, 89, 47, 93, 49, 227, 61), 
                         n_event = c(189,2, 1, 0, 21, 11, 1, 
                                     8, 4, 2, 21, 4, 13, 5)), 
                    class = c("tbl_df", "tbl", "data.frame"), 
                    row.names = c(NA, -14L))

Need to set tau.common = TRUE to compare the result with the meta-regression需要设置 tau.common = TRUE 以将结果与元回归进行比较

    m <- metaprop(event = n_event, n = n_tot, data = df, 
                  comb.fixed = FALSE, method = "Inverse",
                  byvar = group, tau.common = T)


    m
    # Output truncated...

    #> Test of heterogeneity:
    #>       Q d.f.  p-value
    #>  109.01   13 < 0.0001
    #> 
    #> Results for subgroups (random effects model):
    #>             k proportion           95%-CI  tau^2    tau     Q   I^2
    #> group = A   9     0.0408 [0.0199; 0.0818] 0.9127 0.9553 87.69 90.9%
    #> group = B   5     0.0879 [0.0367; 0.1959] 0.9127 0.9553 21.05 81.0%
    #> 
    #> Test for subgroup differences (random effects model):
    #>                     Q d.f.  p-value
    #> Between groups   1.82    1   0.1768
    #> Within groups  108.73   12 < 0.0001
    #> 
    #> Details on meta-analytical method:
    #> - Inverse variance method
    #> - DerSimonian-Laird estimator for tau^2 (assuming common tau^2 in subgroups)
    #> - Jackson method for confidence interval of tau^2 and tau
    #> - Logit transformation
    #> - Clopper-Pearson confidence interval for individual studies
    #> - Continuity correction of 0.5 in studies with zero cell frequencies

We can manually calculate Odds ratio of group B vs. A我们可以手动计算 B 组与 A 组的优势比

    round((0.0879 / (1-0.0879)) / (0.0408 / (1-0.0408)), 2)
    #> [1] 2.27

Now use metaregression estimates现在使用元回归估计

    metareg(m, group)
    #> 
    #> Mixed-Effects Model (k = 14; tau^2 estimator: DL)
    #> 
    #> tau^2 (estimated amount of residual heterogeneity):     0.9127 (SE = 0.6639)
    #> tau (square root of estimated tau^2 value):             0.9553
    #> I^2 (residual heterogeneity / unaccounted variability): 88.96%
    #> H^2 (unaccounted variability / sampling variability):   9.06
    #> R^2 (amount of heterogeneity accounted for):            0.00%
    #> 
    #> Test for Residual Heterogeneity:
    #> QE(df = 12) = 108.7341, p-val < .0001
    #> 
    #> Test of Moderators (coefficient 2):
    #> QM(df = 1) = 1.8245, p-val = 0.1768
    #> 
    #> Model Results:
    #> 
    #>          estimate      se     zval    pval    ci.lb    ci.ub 
    #> intrcpt   -3.1586  0.3779  -8.3578  <.0001  -3.8993  -2.4179  *** 
    #> groupB     0.8184  0.6059   1.3507  0.1768  -0.3692   2.0060      
    #> 
    #> ---
    #> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Now, just exponentiate the estimate of group B to get Odds ratio of B vs. A现在,只需对 B 组的估计取幂即可得到 B 与 A 的优势比

    round(exp(0.8184), 2)
    #> [1] 2.27

<sup>Created on 2020-05-06 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM