load(file = "datAgg.rda")


library(meta)


meta1 <- metagen(TE = yi, seTE = sem, data = datAgg,
                 studlab = Study,
                 sm = "SMD", hakn = TRUE, method.tau = "EB",
                 n.e = tr, n.c = ct)


modelsub <- update(meta1, byvar = group, print.byvar = FALSE)


tiff("Figure.tiff", width = 12, height = 8, units = 'in', res = 300,
     compression = 'lzw')

forest(modelsub,
       fontsize = 10, fs.heading = 10, digits = 2, col.by = "black",
       leftcols = c("studlab", "n.e", "n.c"),
       leftlabs = c("Study", "n∞ \n Treated", "n∞ \n Controls"))

dev.off()
