metafor (version 2.0-0)

gosh: GOSH Plots for 'rma' Objects

Description

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

Usage

gosh(x, …)

# S3 method for rma gosh(x, subsets, progbar=TRUE, parallel="no", ncpus=1, cl=NULL, …)

Arguments

x

an object of class "rma".

subsets

optional integer to specify the number of subsets.

progbar

logical indicating whether a progress bar should be shown (the default is TRUE).

parallel

character string indicating whether parallel processing should be used (the default is "no"). For parallel processing, set to either "snow" or "multicore". See ‘Details’.

ncpus

integer specifying the number of processes to be used in the parallel operation.

cl

optional snow cluster to use if parallel="snow". If not supplied, a cluster on the local machine is created for the duration of the call.

other arguments.

Value

An object of class "gosh.rma". The object is a list containing the following components:

res

a data frame with the results for each subset (various heterogeneity statistics and the model coefficient(s)).

incl

a matrix indicating which studies were included in which subset.

some additional elements/values.

The results can be printed with the print.gosh.rma function and plotted with the plot.gosh.rma function.

Details

The model specified via x must be a model fitted with either the rma.uni, rma.mh, or rma.peto function.

Olkin et al. (2012) proposed the GOSH (graphical display of study heterogeneity) plot, which is based on examining the results of a fixed-effects model in all possible subsets of size \(1, \ldots, k\) of the \(k\) studies included in a meta-analysis. In a homogeneous set of studies, the model estimates obtained this way should form a roughly symmetric, contiguous, and unimodal distribution. On the other hand, when the distribution is multimodal, then this suggests the presence of heterogeneity, possibly due to outliers and/or distinct subgroupings of studies. Plotting the estimates against some measure of heterogeneity (e.g., \(I<U+00B2>\), \(H<U+00B2>\), or the \(Q\)-statistic) can also help to reveal subclusters, which are indicative of heterogeneity. The same type of plot can be produced by first fitting a fixed-effects model with either the rma.uni (using method="FE"), rma.mh, or rma.peto functions and then passing the fitted model object to the gosh function and then plotting the results.

For models fitted with the rma.uni function (which may involve moderators and/or may be random/mixed-effects models), the idea underlying this type of plot can be generalized by examining the distribution of all model coefficients, plotting them against each other, and against some measure of (residual) heterogeneity (including the estimate of \(\tau<U+00B2>\)).

Note that for models without moderators, application of the method requires fitting a total of \(2^k - 1\) models, which could be an excessively large number when \(k\) is large. For example, for \(k=10\), there are only 1023 possible subsets, but for \(k=20\), this number has already grown to 1048575. For even larger \(k\), it may become computationally infeasible to consider all possible subsets (and even storage of the results could become an issue). Instead, we can then examine (a sufficiently large number of) random subsets.

By default, if the number of possible subsets is \(\le 10^6\), the function will consider all possible subsets and otherwise \(10^6\) random subsets. One can use the subsets argument to specify a different number of subsets to consider. If subsets is specified and it is actually larger than the number of possible subsets, then the function automatically only considers the possible subsets and does not use random subsets.

On machines with multiple cores, one can try to speed things up by delegating the model fitting to separate worker processes, that is, by setting parallel="snow" or parallel="multicore" and ncpus to some value larger than 1. Parallel processing makes use of the parallel package, using the makePSOCKcluster and parLapply functions when parallel="snow" or using the mclapply function when parallel="multicore" (the latter only works on Unix/Linux-alikes). With parallel::detectCores(), one can check on the number of available cores on the local machine. Note that no progress bar will be shown when using parallel processing.

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. http://www.jstatsoft.org/v36/i03/.

See Also

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

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)
sav

### 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, adjust=.3)
# }

Run the code above in your browser using DataLab