# If needed, install "rmeta" # install.packages("rmeta") library(rmeta) data(cochrane) cochrane meta.MH(ntrt = n.trt, nctrl = n.trt, ptrt = ev.trt, pctrl = ev.ctrl, conf.level=0.95, names = cochrane$name, data = cochrane, statistic="OR") analysis <- meta.MH(ntrt = n.trt, nctrl = n.trt, ptrt = ev.trt, pctrl = ev.ctrl, conf.level=0.95, names = cochrane$name, data = cochrane, statistic="OR") summary(analysis) plot(analysis, main = "Meta-Analysis", colors=meta.colors("blue")) # For funnel plot (for publication bias): funnelplot(analysis, plot.conf=TRUE, mirror = TRUE) # The plot should appear as a upwards-pointing funnel shape. Publication bias often causes one side of the funnel to be trimmed near the base. # The mirror plot creates a symmetric funnel by reflecting the plot around the summ value. In the presence of publication bias the added points will separate from the real studies. # meta.mh(): https://www.rdocumentation.org/packages/rmeta/versions/3.0/topics/meta.MH # plot(): https://www.rdocumentation.org/packages/graphics/versions/3.5.1/topics/plot # funnelplot(): https://www.rdocumentation.org/packages/rmeta/versions/3.0/topics/funnelplot