簡體   English   中英

薈萃分析:使用薈萃套件進行匯總估算的森林圖

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

我發現有一種方法可以使用“ metafor”包創建匯總估算值的森林圖,可以在這里找到: 元分析:使用metafor包匯總估算值的森林圖

meta包也有解決方案嗎? 通過30多項研究, byvar函數生成的森林圖不適合該窗口。

這里是一個例子:

### 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM