bubble.metareg: Bubble plot to display the result of a meta-regression

View source: R/bubble.R

bubble.metaregR Documentation

Bubble plot to display the result of a meta-regression

Description

Draw a bubble plot to display the result of a meta-regression.

Usage

## S3 method for class 'metareg'
bubble(
  x,
  xlim,
  ylim,
  xlab,
  ylab,
  cex,
  min.cex = 0.5,
  max.cex = 5,
  pch = 21,
  col = "black",
  bg = "darkgray",
  lty = 1,
  lwd = 1,
  col.line = "black",
  studlab = FALSE,
  cex.studlab = 0.8,
  pos.studlab = 2,
  offset = 0.5,
  regline = TRUE,
  backtransf = x$.meta$x$backtransf,
  ref,
  col.ref = "lightgray",
  lty.ref = 1,
  lwd.ref = 1,
  pscale = x$.meta$x$pscale,
  irscale = x$.meta$x$irscale,
  axes = TRUE,
  box = TRUE,
  ...
)

bubble(x, ...)

Arguments

x

An object of class metareg.

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.

cex

The magnification to be used for plotting symbols.

min.cex

Minimal magnification for plotting symbols.

max.cex

Maximal magnification for plotting symbols.

pch

The plotting symbol(s) used for individual studies.

col

A vector with colour of plotting symbols.

bg

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

lty

The line type for the meta-regression line.

lwd

The line width for the meta-regression line.

col.line

Colour for the meta-regression line.

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 the numer of studies in the meta-analysis then).

cex.studlab

The magnification for study labels.

pos.studlab

Position of study labels, see argument pos in text.

offset

Offset for study labels (see text).

regline

A logical indicating whether a regression line should be added to the bubble plot.

backtransf

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

ref

A numerical giving the reference value to be plotted as a line in the bubble plot. No reference line is plotted if argument ref is equal to NA.

col.ref

Colour of the reference line.

lty.ref

The line type for the reference line.

lwd.ref

The line width for the reference line.

pscale

A numeric giving scaling factor for printing of probabilities.

irscale

A numeric defining a scaling factor for printing of incidence rates.

axes

Either a logical or a character string equal to "x", "y" or "xy" indicating whether x- and y-axis should be printed.

box

A logical indicating whether a box should be printed.

...

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

Details

A bubble plot can be used to display the result of a meta-regression. It is a scatter plot with the treatment effect for each study on the y-axis and the covariate used in the meta-regression on the x-axis. Typically, the size of the plotting symbol is inversely proportional to the variance of the estimated treatment effect (Thompson & Higgins, 2002).

Argument cex specifies the plotting size for each individual study. If this argument is missing the weights from the meta-regression model will be used (which typically is a random effects model). Use cex="common" in order to utilise weights from a common effect model to define the size of the plotted symbols (even for a random effects meta-regression). If a vector with individual study weights is provided, the length of this vector must be of the same length as the number of studies.

Arguments min.cex and max.cex can be used to define the size of the smallest and largest plotting symbol. The plotting size of the most precise study is set to max.cex whereas the plotting size of all studies with a plotting size smaller than min.cex will be set to min.cex.

For a meta-regression with more than one covariate. Only a scatter plot of the first covariate in the regression model is shown. In this case the effect of the first covariate adjusted for other covariates in the meta-regression model is shown.

For a factor or categorial covariate separate bubble plots for each group compared to the baseline group are plotted.

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

References

Thompson SG, Higgins JP (2002): How should meta-regression analyses be undertaken and interpreted? Statistics in Medicine, 21, 1559–73

See Also

metagen, metainf

Examples

data(Fleiss1993cont)

# Add some (fictitious) grouping variables:
Fleiss1993cont$age <- c(55, 65, 52, 65, 58)
Fleiss1993cont$region <- c("Europe", "Europe", "Asia", "Asia", "Europe")

m1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
  data = Fleiss1993cont, sm = "SMD")

mr1 <- metareg(m1, region)
mr1

bubble(mr1)
bubble(mr1, lwd = 2, col.line = "blue")

mr2 <- metareg(m1, age)
mr2

bubble(mr2, lwd = 2, col.line = "blue", xlim = c(50, 70))
bubble(mr2, lwd = 2, col.line = "blue", xlim = c(50, 70), cex = "common")

# Do not print regression line
#
bubble(mr2, lwd = 2, col.line = "blue", xlim = c(50, 70), regline = FALSE)


meta documentation built on Oct. 31, 2024, 5:07 p.m.