install.packages("meta") library(meta) data("Olkin95") # 70 studies m1 <- metabin(event.e, n.e, event.c, n.c, data=Olkin95) m1 # Subgroup analysis (subgroups defined by dividing studies in two parts a 35 studies) m2 <- update(m1, byvar = m1$studlab <= 35) # One large forest plot, only with a slightly greater gap between the subgroups # (for cutting it up using graphic tools outside R) pdf("LargeForest.pdf", height = 16) forest(m2, print.byvar = FALSE, print.subgroup.labels = FALSE, comb.fixed = FALSE, comb.random = FALSE, hetstat = FALSE) dev.off() # Separate analyses by subsets m3 <- update(m1, subset = m1$studlab <= 35) forest(m3, comb.fixed = FALSE, comb.random = FALSE, hetstat = FALSE) m4 <- update(m1, subset = m1$studlab > 35) forest(m4, comb.fixed = FALSE, comb.random = FALSE, hetstat = FALSE) # Limitations: # 1. No pooled estimate for all studies together # 2. Weights refer only to subsets, therefore not comparable between subsets # Alternatively, make all markers equally large: forest(m3, comb.fixed = FALSE, comb.random = FALSE, hetstat = FALSE, weight.study = "same") forest(m4, comb.fixed = FALSE, comb.random = FALSE, hetstat = FALSE, weight.study = "same")