简体   繁体   English

荟萃分析:使用荟萃套件进行汇总估算的森林图

[英]Meta-analysis: Forest plot of summary estimates using meta package

I've found there is a way to create a forest plot of summary estimates with the 'metafor' package, which can be found here: Meta-analysis: Forest plot of summary estimates using metafor package 我发现有一种方法可以使用“ metafor”包创建汇总估算值的森林图,可以在这里找到: 元分析:使用metafor包汇总估算值的森林图

Is there a solution for the meta package, too? meta包也有解决方案吗? With over 30 studies, the byvar function produces a forest plot that does not fit the window. 通过30多项研究, byvar函数生成的森林图不适合该窗口。

Here an example: 这里是一个例子:

### the data

d <- structure(list(study = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 
7L, 8L, 8L, 8L, 10L, 9L, 11L, 11L, 12L, 13L, 14L, 14L, 15L, 16L, 
17L, 18L), .Label = c("Bort et al. 2012                ", "Boyl et al. 2004                ", 
"Cart et al. 2007                ", "Coryet al. 2009                 ", 
"Cosoff 1998                     ", "Dell'a 2011                     ", 
"Dilan 2003                      ", "Dilton et al. 1997              ", 
"Mac et al. 2001                 ", "Man et al. 2006                 ", 
"Okan 2011                       ", "Orol et al. 2006                ", 
"Pinto et al. 2003               ", "Simone et al. 2004              ", 
"Strahowski et al. 1992          ", "Tamara 2002                     ", 
"Viera et al. 2001               ", "Zucchi et al. 2006              "
), class = "factor"), xi = c(60, 40, 13, 107, 3, 32, 1, 16, 33, 
1, 20, 46, 27, 30, 22, 78, 35, 33, 5, 2, 4, 3, 4), ni = c(200, 
140, 56, 427, 20, 508, 25, 19, 53, 32, 44, 191, 288, 50, 46, 
918, 151, 360, 115, 41, 70, 129, 80), group = structure(c(3L, 
3L, 1L, 3L, 3L, 3L, 1L, 1L, 2L, 1L, 1L, 3L, 3L, 1L, 2L, 3L, 3L, 
1L, 2L, 1L, 1L, 4L, 4L), .Label = c("anxiety     ", "depression  ", 
"mixed       ", "remission   "), class = "factor")), .Names = c("study", 
"xi", "ni", "group"), row.names = c(NA, -23L), class = "data.frame", codepage = 1252L)

attach(d)

### the code

### load the library

library(meta)

library(metafor)

#### the model 
#### Freeman-Tukey Double arcsine transformation
#### Empirical Bayes estimator  and Hartung and Knapp adjustment

model <- metaprop(xi,ni,sm="PFT",hakn=TRUE, method.tau="EB")

########################
#
# subgroup analyses
#
########################


modelsub <- update(model, byvar=group)

summary(modelsub)

forest(modelsub,studlab=paste(study), print.byvar=FALSE)

#################################
#
# solution to a poor forest plot
#
#################################

### a good solution is to save the plot in .pdf 
### you have to play around with the 'width' and 'height' parameters 
### I used  width=12,height=13 (as higher the values, as more space you will get)

pdf(file="good forest plot.pdf", width=12,height=13)

forest(modelsub,studlab=paste(study), print.byvar=FALSE)

dev.off()

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

相关问题 Meta分析:使用metafor包进行汇总估算的森林图 - Meta-analysis: Forest plot of summary estimates using metafor package 定制森林图以进行网络元分析 - Customizing forest plot for a network meta-analysis R:使用metafor软件包在荟萃分析的森林图中加下划线 - R: underscore letters in forest plot of meta-analysis using the metafor package 改进 Forest plot 用于亚组分析(不用于荟萃分析)? - Improve Forest plot for subgroup analysis (not for meta-analysis)? 在元分析中访问/保存来自 metafor 森林图的信息 - Access / save information from metafor forest plot in meta-analysis metafor:将数据包括在森林图中,但不包括荟萃分析模型 - metafor: Including data in forest plot but not meta-analysis model Meta分析森林plot去除共同效应model估计 - Meta-analysis forest plot removing common effect model estimate 使用 R 在荟萃分析中结合森林 plot 和红绿灯 plot - Combining forest plot and traffic light plot in meta-analysis using R 如何在不丢失 plot 汇总信息的情况下编辑 meta::forest plot 的列? 我正在关注 R bookdown 中的 Harrer 元分析 - How do I edit the columns of a meta::forest plot without losing plot summary information? I'm following Harrer meta-analysis in R bookdown 使用 Metafor 或 Meta 对比例进行荟萃分析 - Using Metafor or Meta for meta-analysis of proportions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM