# NOT RUN {
data(Olkin95)
m1 <- metabin(event.e, n.e, event.c, n.c,
data = Olkin95, subset = c(41, 47, 51, 59),
studlab = paste(author, year),
sm = "RR", method = "I")
oldpar <- par(mfrow = c(2, 2))
# Standard funnel plot
#
funnel(m1)
# Same result as code above:
funnel(m1$TE, m1$seTE, sm = "RR",
comb.fixed = TRUE, level = 0.95)
# Funnel plot with confidence intervals, fixed effect estimate and
# contours
#
cc <- funnel(m1, comb.fixed = TRUE,
level = 0.95, contour = c(0.9, 0.95, 0.99))$col.contour
legend(0.05, 0.05,
c("0.1 > p > 0.05", "0.05 > p > 0.01", "< 0.01"), fill = cc)
# Contour-enhanced funnel plot with user-chosen colours
#
funnel(m1, comb.fixed = TRUE,
level = 0.95, contour = c(0.9, 0.95, 0.99),
col.contour = c("darkgreen", "green", "lightgreen"),
lwd = 2, cex = 2, pch = 16, studlab = TRUE, cex.studlab = 1.25)
legend(0.05, 0.05,
c("0.1 > p > 0.05", "0.05 > p > 0.01", "< 0.01"),
fill = c("darkgreen", "green", "lightgreen"))
par(oldpar)
# }
Run the code above in your browser using DataLab