【发布时间】: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