我有兴趣为森林图制作两个子组。其中一个子组将是“完整的”,而另一个将是“不完整的”。我希望得到类似于 metafor 给出的示例之一的内容:
目前,这是我用我的代码制作的森林图:
Study <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
Author <- c('Study 1', 'Study 2', 'Study 3', 'Study 4','Study 5', 'Study 6', 'Study 7', 'Study 8', 'Study 9',
'Study 10', 'Study 11', 'Study 12', 'Study 13', 'Study 14', 'Study 15')
Year <- c(2014, 2008, 2013, 2013, 2011, 2013, 2013, 2012, 2013, 2012, 2013, 2014, 2014, 2011, 2014)
EffectSize <- c(0.520, 0.110, 0.260, 0.204, 0.443, 0.156, 0.160, 0.280, 0.051, 0.082, 0.268,-0.360, 0.333, 0.519, 0.300)
SampleSize<- c(37, 255, 143, 143, 92, 563, 94, 117, 147, 1352, 368, 28, 52, 21, 48)
Outcome <- c('Incomplete', 'Incomplete',
'Completed Some', 'Completed Some',
'Completed Some', 'Completed Some',
'Completed Some', 'Completed Most',
'Completed Most', 'Completed Most', 'Completed Most', 'Complete',
'Anxiety & Depression', 'Complete', 'Complete')
Allocation <- c('Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Complete',
'Other', 'Complete', 'Complete')
meta.data <-data.frame(Study, Author, Year, EffectSize, SampleSize, Outcome, Allocation)
Meta.poster <- escalc(measure = "COR", ri = EffectSize, ni = SampleSize, data = meta.data)
meta.random.model <- rma(yi = yi, vi = vi, data = Meta.poster, slab = Author, level = 95)
fsn(yi, vi, data = Meta.poster)
forest(meta.random.model) #Basic forest plot
forest(meta.random.model, slab = paste(Meta.poster$Author, Meta.poster$Year, sep = ", "))
op <- par(cex = 0.90, font = 2)
text(-1.45, 16.5, "First Author and Year", pos = 2)
text(2.65, 16.5, "Effect Size [95% CI]", pos = 2)
par(op)
漏斗(meta.random.model