Learn R Programming

meta (version 4.9-7)

funnel: Funnel plot

Description

Draw a funnel plot which can be used to assess small study effects in meta-analysis. A contour-enhanced funnel plot can also be produced to assess causes of funnel plot asymmetry.

Usage

funnel(x, ...)

# S3 method for default funnel(x, y, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, comb.fixed = FALSE, comb.random = FALSE, axes = TRUE, pch = 21, text = NULL, cex = 1, lty.fixed = 2, lty.random = 9, lwd = 1, lwd.fixed = lwd, lwd.random = lwd, col = "black", bg = "darkgray", col.fixed = "black", col.random = "black", log = "", yaxis = "se", sm = "", contour.levels = NULL, col.contour, ref = ifelse(backtransf & is.relative.effect(sm), 1, 0), level = NULL, studlab = FALSE, cex.studlab = 0.8, pos.studlab = 2, backtransf = TRUE, ...)

# S3 method for meta funnel(x, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, comb.fixed = x$comb.fixed, comb.random = x$comb.random, axes = TRUE, pch = if (!inherits(x, "trimfill")) 21 else ifelse(x$trimfill, 1, 21), text = NULL, cex = 1, lty.fixed = 2, lty.random = 9, lwd = 1, lwd.fixed = lwd, lwd.random = lwd, col = "black", bg = "darkgray", col.fixed = "black", col.random = "black", log = "", yaxis = "se", contour.levels = NULL, col.contour, ref = ifelse(backtransf & is.relative.effect(x$sm), 1, 0), level = x$level, studlab = FALSE, cex.studlab = 0.8, pos.studlab = 2, ref.triangle = FALSE, lty.ref = 1, lwd.ref = lwd, col.ref = "black", lty.ref.triangle = 5, backtransf = x$backtransf, ...)

Arguments

x

An object of class meta, or estimated treatment effect in individual studies.

Graphical arguments as in par may also be passed as arguments.

y

Standard error of estimated treatment effect.

xlim

The x limits (min,max) of the plot.

ylim

The y limits (min,max) of the plot.

xlab

A label for the x-axis.

ylab

A label for the y-axis.

comb.fixed

A logical indicating whether the pooled fixed effect estimate should be plotted.

comb.random

A logical indicating whether the pooled random effects estimate should be plotted.

axes

A logical indicating whether axes should be drawn on the plot.

pch

The plotting symbol used for individual studies.

text

A character vector specifying the text to be used instead of plotting symbol.

cex

The magnification to be used for plotting symbol.

lty.fixed

Line type (pooled fixed effect estimate).

lty.random

Line type (pooled random effects estimate).

lwd

The line width for confidence intervals (if level is not NULL).

lwd.fixed

The line width for fixed effect estimate (if comb.fixed is not NULL).

lwd.random

The line width for random effects estimate (if comb.random is not NULL).

col

A vector with colour of plotting symbols.

bg

A vector with background colour of plotting symbols (only used if pch in 21:25).

col.fixed

Color of line representing fixed effect estimate.

col.random

Color of line representing random effects estimate.

log

A character string which contains "x" if the x-axis is to be logarithmic, "y" if the y-axis is to be logarithmic and "xy" or "yx" if both axes are to be logarithmic (applies only to function funnel).

yaxis

A character string indicating which type of weights are to be used. Either "se", "invvar", "invse", or "size" (applies only to function funnel).

sm

A character string indicating underlying summary measure, e.g., "RD", "RR", "OR", "ASD", "HR", "MD", "SMD", or "ROM" (applies only to function funnel).

contour.levels

A numeric vector specifying contour levels to produce contour-enhanced funnel plot.

col.contour

Colour of contours.

ref

Reference value (null effect) used to produce contour-enhanced funnel plot.

level

The confidence level utilised in the plot. For the funnel plot, confidence limits are not drawn if yaxis="size".

studlab

A logical indicating whether study labels should be printed in the graph. A vector with study labels can also be provided (must be of same length as x$TE then).

cex.studlab

Size of study labels, see argument cex in text.

pos.studlab

Position of study labels, see argument pos in text.

backtransf

A logical indicating whether results for relative summary measures (argument sm equal to "OR", "RR", "HR", or "IRR") should be back transformed in funnel plots. If backtransf=TRUE, results for sm="OR" are printed as odds ratios rather than log odds ratios, for example.

ref.triangle

A logical indicating whether reference value (null effect) should be printed.

lty.ref

Line type (reference value).

lwd.ref

The line width for the reference value and corresponding confidence intervals (if ref.triangle is TRUE and level is not NULL).

col.ref

Color of line representing reference value.

lty.ref.triangle

Line type (confidence intervals of reference value).

Details

A funnel plot (Light & Pillemer, 1984) is drawn in the active graphics window. If comb.fixed is TRUE, the pooled estimate of the fixed effect model is plotted. If level is not NULL, the corresponding confidence limits are drawn.

In the funnel plot, if yaxis is "se", the standard error of the treatment estimates is plotted on the y-axis which is likely to be the best choice (Sterne & Egger, 2001). Other possible choices for yaxis are "invvar" (inverse of the variance), "invse" (inverse of the standard error), and "size" (study size).

For yaxis!="size", contour-enhanced funnel plots can be produced (Peters et al., 2008) by specifying the contour levels (argument contour.levels). By default (argument col.contour missing), suitable gray levels will be used to distinguish the contours. Different colours can be chosen by argument col.contour.

References

Light RJ & Pillemer DB (1984): Summing Up. The Science of Reviewing Research. Cambridge: Harvard University Press

Peters JL, Sutton AJ, Jones DR, Abrams KR, Rushton L (2008): Contour-enhanced meta-analysis funnel plots help distinguish publication bias from other causes of asymmetry. Journal of Clinical Epidemiology, 61, 991--6

Sterne JAC & Egger M (2001): Funnel plots for detecting bias in meta-analysis: Guidelines on choice of axis. Journal of Clinical Epidemiology, 54, 1046--55

See Also

metabias, metabin, metagen, radial

Examples

Run this code
# 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