metafor (version 2.4-0)

plot.gosh.rma: Plot Method for 'gosh.rma' Objects

Description

Plot method for objects of class "gosh.rma".

Usage

# S3 method for gosh.rma
plot(x, het="I2", pch=16, cex=0.5, out, col, alpha, border,
     xlim, ylim, xhist=TRUE, yhist=TRUE, hh=.3, breaks,
     adjust, lwd, labels, …)

Arguments

x

an object of class "gosh.rma".

het

character string indicating the heterogeneity measure to plot. Either "I2", "H2", "QE", or "tau2" (the last only for random/mixed-effects models).

pch

plotting symbol to use. By default, a borderless filled circle is used. See points for other options.

cex

symbol expansion factor.

out

optional integer indicating the number of a study that may be a potential outlier. If specified, subsets containing the specified study are drawn in a different color than those not containing the study.

col

optional character string specifying the name of a color to use for the points (if not provided, points are drawn in black). When out is used, two colors should be specified (if not provided, red is used for subsets containing the specified study and blue otherwise).

alpha

optional alpha transparency value for the points (0 means fully transparent and 1 means opaque). If unspecified, the function tries to set this to a sensible value.

border

optional character string specifying the name of a color to use for the borders of the histogram (if not provided, borders are drawn in white). Set to FALSE to omit the borders.

xlim

x-axis limits. If unspecified, the function tries to set the x-axis limits to some sensible values.

ylim

y-axis limits. If unspecified, the function tries to set the y-axis limits to some sensible values.

xhist

logical specifying whether a histogram should be drawn for the x-axis (the default is TRUE).

yhist

logical specifying whether a histogram should be drawn for the y-axis (the default is TRUE).

hh

optional numerical value (or vector of two values) to adjust the height of the histogram(s). Must be between 0 and 1, but should not be too close to 0 or 1, as otherwise the plot cannot be drawn.

breaks

optional argument passed on to hist for choosing the (number of) breakpoints of the histogram(s).

adjust

optional argument passed on to density for adjusting the bandwidth of the kernel density estimate(s) (values larger than 1 result in more smoothing).

lwd

optional numeric value to specify the line width of the estimated densities. Set to 0 to omit the line(s).

labels

optional argument to specify the x-axis and y-axis labels (or passed on to pairs for specifying the names of the variables in the scatterplot matrix).

other arguments.

Details

For models without moderators, the function draws a scatterplot of the model estimates on the x-axis against the chosen measure of heterogeneity on the y-axis. Histograms of the respective distributions (with kernel density estimates superimposed) are shown in the margins (when xhist=TRUE and yhist=TRUE).

For models with moderators, the function draws a scatterplot matrix (with the pairs function) of the chosen measure of heterogeneity and each of the model coefficients. Histograms of the variables plotted are shown along the diagonal, with kernel density estimates of the distributions superimposed. Arguments xlim, ylim, xhist, and yhist are then ignored (argument hh can then be used to compress/stretch the height of the distributions shown along the diagonal).

References

Olkin, I., Dahabreh, I. J., & Trikalinos, T. A. (2012). GOSH - a graphical display of study heterogeneity. Research Synthesis Methods, 3, 214--223.

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. https://www.jstatsoft.org/v036/i03.

See Also

gosh.rma

Examples

Run this code
# NOT RUN {
### meta-analysis of all trials including ISIS-4 using a FE model
res <- rma(measure="OR", ai=ai, n1i=n1i, ci=ci, n2i=n2i, data=dat.egger2001, method="FE")

# }
# NOT RUN {
### fit FE model to all possible subsets (65535 models)
sav <- gosh(res)

### create GOSH plot
### red points for subsets that include and blue points
### for subsets that exclude study 16 (the ISIS-4 trial)
plot(sav, out=16, breaks=100)
# }

Run the code above in your browser using DataCamp Workspace