【问题标题】:Meta analysis: transform forest plot output to percentage元分析:将森林图输出转换为百分比
【发布时间】:2021-08-23 17:55:33
【问题描述】:

我是新的 R 用户。我正在尝试将使用 metaprop 生成的森林图上的比例转换为百分比。

我在这里查看了Quick question about transforming proportions to percentages - forest function in R 和这篇文章所指的链接。


mytransf = function(x)
  (x) * 100

studies <- c("Study 1", "Study 2", "Study 3")
obs <- c(104, 101,79670)
denom <- c(1146, 2613, 147766)
m1 <- metaprop(obs, denom, studies, comb.random=FALSE,  
               byseparator=": ")
forest(m1, print.tau2 = FALSE, col.by="black", text.fixed = "Total number of events",
       text.fixed.w = "Subtotal", rightcols = c("effect","ci"), 
       leftlabs=c("Study","Events","Total"), 
       xlim=c(0,0.7), 
       transf=mytransf)

输出仍然是比例,而不是百分比。我也试过“atransf”。有人能帮我解决这个问题吗?这是我目前可以生成的:picture of output

【问题讨论】:

    标签: r percentage metafor


    【解决方案1】:

    您可以使用metaproppscale 选项:

    library(meta)
    
    studies <- c("Study 1", "Study 2", "Study 3")
    obs <- c(104, 101,79670)
    denom <- c(1146, 2613, 147766)
    m1 <- metaprop(obs, denom, studies, comb.random=FALSE,  
                   byseparator=": ",
                   pscale=100)
    
    forest(m1, print.tau2 = FALSE, col.by="black", 
           text.fixed = "Total number of events",
           text.fixed.w = "Subtotal", 
           rightlabs = c("Prop. (%)","[95% CI]"), 
           leftlabs=c("Study","Events","Total"), 
           xlim=c(0,70))
    

    【讨论】:

      猜你喜欢
      • 2015-06-11
      • 1970-01-01
      • 2022-01-01
      • 1970-01-01
      • 2012-02-17
      • 2019-07-03
      • 2016-03-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多