Learn R Programming

metafor (version 1.4-0)

funnel.rma: Funnel Plots for rma Objects

Description

Function to create funnel plots for objects of class "rma".

Usage

## S3 method for class 'rma':
funnel(x, xlim=NULL, ylim=NULL, xlab=NULL, ylab="Standard Error", 
       steps=5, at=NULL, atransf=FALSE, targs=NULL, 
       digits=c(2,3), level=x$level, addtau2=FALSE, 
       type="rstandard", back="lightgray", shade="white", 
       hlines="white", refline=NULL, pch=19, pch.fill=21, ...)

Arguments

x
an object of class "rma".
xlim
x axis limits. Defaults to NULL, which means that the function tries to set the x axis limits to some sensible values.
ylim
y axis limits. Defaults to NULL, which means that the function tries to set the y axis limits to some sensible values.
xlab
title for the x axis. If NULL (default), the function tries to set an appropriate axis title.
ylab
title for the y axis.
steps
the number of tick marks for the y axis (default is 5).
at
position of the x axis tick marks and corresponding labels. Defaults to NULL, which means that the function tries to set the tick mark positions/labels to some sensible values.
atransf
an optional argument specifying the name of a function that should be used to transform the x axis labels (e.g., transf=exp). Defaults to FALSE, which means that no transformation is used.
targs
optional arguments needed by the function specified via atransf.
digits
integer value specifying the number of decimal places to which the tick mark labels of the x and y axis should be rounded. Can also be a vector of two integers, the first specifying the number of decimal places for the x axis, the second for the y axis la
level
numerical value between 0 and 100 specifying the level of the pseudo confidence interval region (the default is to take the value from the object). May also be a vector of values to obtain multiple regions. See Examples.
addtau2
logical to indicate whether the amount of heterogeneity should be accounted for when drawing the pseudo confidence interval region (default is FALSE). Ignored when the model includes moderators and residuals are plotted.
type
either "rstandard" (default) or "rstudent" indicating whether the usual or deleted residuals should be used in creating the funnel plot when the model involves moderators. See Details.
back
color to use for the background of the plotting region.
shade
color to use for shading the pseudo confidence interval region. When level is a vector of values, different shading colors can be specified for each region.
hlines
color of the horizontal reference lines.
refline
value at which the pseudo confidence interval should be centered. Default is NULL, which means that the interval is centered at the fixed- or random-effects model estimate when the model does not include moderators and at zero when moderators
pch
plotting symbol to use for the observed effect sizes or outcomes. By default, a solid circle is used. Can also be a vector of values. See points for other options.
pch.fill
plotting symbol to use for the effect sizes or outcomes filled in by the trim and fill method. By default, a circle is used. Only relevant when plotting an object created by the trimfill function.
...
other arguments.

Details

For fixed- and random-effects models (i.e., models not involving moderators), the plot shows the individual observed effect sizes or outcomes on the x axis against the corresponding standard errors (i.e., the square root of the sampling variances) on the y axis. A vertical line indicates the estimate based on the model. A pseudo confidence interval region is drawn around this value with bounds equal to $\pm 1.96 SE$, where $SE$ is the standard error value from the y axis. If addtau2=TRUE, then the bounds of the pseudo confidence interval region are equal to $\pm 1.96 \sqrt{SE^2 + \tau^2}$, where $\tau^2$ is the amount of heterogeneity as estimated by the model. For models involving moderators, the plot shows the residuals on the x axis against their corresponding standard errors. Either the usual or deleted residuals can be used for that purpose (set via the type argument). See residuals.rma for more details on the different types of residuals. If the object passed to the function comes from the trimfill function, the effect sizes or outcomes that are filled in by the trim and fill method are also added to the funnel plot. The arguments back, shade, and hlines can be set to NULL to suppress the shading and the horizontal reference lines.

References

Light, R. J. & Pillemer, D. B. (1984). Summing up: The science of reviewing research. Cambridge, MA: Harvard University Press. Peters, J. L., Sutton, A. J., Jones, D. R., Abrams, K. R. & Rushton, L. (2008). Contour-enhanced meta-analysis funnel plots help distinguish publication bias from other causes of asymmetry. Journal of Clinical Epidemiology, 61, 991--996. Sterne, J. A. C. & Egger, M. (2001). Funnel plots for detecting bias in meta-analysis: Guidelines on choice of axis. Journal of Clinical Epidemiology, 54, 1046--1055. Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

rma.uni, rma.mh, rma.peto, influence.rma.uni, trimfill

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log relative risks using a random-effects model
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, 
           data=dat.bcg, measure="RR", method="REML")

### standard funnel plot
funnel(res)

### funnel plot with relative risk values on the x axis
funnel(res, atransf=exp, at=log(c(.12, .25, .5, 1, 2)))

### contour-enhanced funnel plot centered at 0 (see Peters et al., 2008)
funnel(res, level=c(90, 95, 99), shade=c("white", "gray", "darkgray"), 
       cex=1.2, refline=0)

### mixed-effects model with absolute latitude in the model
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=ablat,
           data=dat.bcg, measure="RR", method="REML")
funnel(res)

Run the code above in your browser using DataLab