metafor (version 3.0-2)

baujat: Baujat Plots for 'rma' Objects

Description

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

Usage

baujat(x, …)

# S3 method for rma baujat(x, xlim, ylim, xlab, ylab, cex, symbol="ids", grid=TRUE, progbar=FALSE, …)

Arguments

x

an object of class "rma".

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.

xlab

title for the x-axis. If unspecified, the function tries to set an appropriate axis title.

ylab

title for the y-axis. If unspecified, the function tries to set an appropriate axis title.

cex

optional character expansion factor. If unspecified, the function tries to set this to a sensible value.

symbol

either an integer to specify the pch value (i.e., plotting symbol), or "slab" to plot the study labels, or "ids" (the default) to plot the study id numbers.

grid

logical to specify whether a grid should be added to the plot (can also be a color name).

progbar

logical to specify whether a progress bar should be shown (the default is FALSE).

other arguments.

Value

A data frame with components:

x

the x-axis coordinates of the points that were plotted.

y

the y-axis coordinates of the points that were plotted.

ids

the study id numbers.

slab

the study labels.

Note that the data frame is returned invisibly.

Details

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

Baujat et al. (2002) proposed a diagnostic plot to detect sources of heterogeneity in meta-analytic data. The plot shows the contribution of each study to the overall Q-test statistic for heterogeneity on the x-axis versus the influence of each study (defined as the standardized squared difference between the overall estimate based on a fixed-effects model with and without the study included in the model fitting) on the y-axis. 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 baujat function.

For models fitted with the rma.uni function (which may involve moderators and/or which may be random/mixed-effects models), the idea underlying this type of plot can be generalized as follows (Viechtbauer, 2021): The x-axis then corresponds to the squared Pearson residual of a study, while the y-axis corresponds to the standardized squared difference between the predicted/fitted value for the study with and without the study included in the model fitting. Therefore, for a fixed-effects with moderators model, the x-axis corresponds to the contribution of the study to the Q_E-test statistic for residual heterogeneity.

By default, the points plotted are the study id numbers, but one can also plot the study labels by setting symbol="slab" (if study labels are available within the model object) or one can specify a plotting symbol via the symbol argument that gets passed to pch (see points for possible options).

References

Baujat, B., Mahe, C., Pignon, J.-P., & Hill, C. (2002). A graphical method for exploring heterogeneity in meta-analyses: Application to a meta-analysis of 65 trials. Statistics in Medicine, 21(18), 2641--2652. https://doi.org/10.1002/sim.1221

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

Viechtbauer, W. (2021). Model checking in meta-analysis. In C. H. Schmid, T. Stijnen, & I. R. White (Eds.), Handbook of meta-analysis (pp. 219--254). Boca Raton, FL: CRC Press. https://doi.org/10.1201/9781315119403

See Also

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

Examples

Run this code
# NOT RUN {
### copy data from Pignon et al. (2000) into 'dat'
dat <- dat.pignon2000

### calculate estimated log hazard ratios and sampling variances
dat$yi <- with(dat, OmE/V)
dat$vi <- with(dat, 1/V)

### meta-analysis based on all 65 trials
res <- rma(yi, vi, data=dat, method="FE", slab=trial)

### create Baujat plot
baujat(res)

### some variations of the plotting symbol
baujat(res, symbol=19)
baujat(res, symbol="slab")

### label only a selection of the more 'extreme' points
sav <- baujat(res, symbol=19, xlim=c(0,20))
sav <- sav[sav$x >= 10 | sav$y >= 0.10,]
text(sav$x, sav$y, sav$slab, pos=1)
# }

Run the code above in your browser using DataLab