Learn R Programming

meta (version 0.5)

plot.meta: Plot function for objects of class meta

Description

Draws a forest plot in the active graphics window.

Usage

plot.meta(x, byvar, bylab, sortvar, studlab = TRUE, level = 0.95,
          level.comb = level, comb.f = FALSE, comb.r = FALSE,
          text.f = "Fixed effect model", text.r = "Random effects model",
          lty.f = 2, lty.r = 3, xlab, xlim, ylim, lwd = 1, cex = 1,
          cex.comb = 1.2 * cex,
          log = ifelse(x$sm == "RR" | x$sm == "OR" | x$sm == "HR", "x", ""),
          axes = TRUE, allstudies = TRUE, weight = "fixed", scale.diamond = 1,
          scale.square =  1, col.i = "black", ...)

Arguments

x
An object of class meta).
byvar
An optional vector containing grouping information (must be of same length as x$TE).
bylab
A character string with a label for the grouping variable.
sortvar
An optional vector used to sort the individual studies (must be of same length as x$TE).
studlab
A logical indicating whether study labels should be printed in the graph.
level
The level used to calculate confidence intervals for individual studies.
level.comb
The level used to calculate confidence intervals for pooled estimates.
comb.f
A logical indicating whether the pooled fixed effect estimate should be plotted.
comb.r
A logical indicating whether the pooled random effects estimate should be plotted.
text.f
A character string used in the plot to label the pooled fixed effects estimate.
text.r
A character string used in the plot to label the pooled random effects estimate.
lty.f
Line type (pooled fixed effect estimate).
lty.r
Line type (pooled random effects estimate).
xlab
A label for the x axis.
xlim
The x limits (min,max) of the plot.
ylim
The y limits (min,max) of the plot.
lwd
The line width.
cex
A numerical value giving the amount by which plotting text and symbols should be scaled relative to the default.
cex.comb
A numerical value giving the amount by which plotting text and symbols for pooled fixed and random effects estimates should be scaled.
log
A character string which contains "x" if the x axis is to be logarithmic (other values for log are not reasonable).
axes
A logical indicating whether the x axis should be drawn on the plot.
allstudies
A logical indicating whether studies with inestimable treatment effects should be plotted.
weight
A character string indicating which type of plotting symbols is to be used for individual treatment estimates. One of "same" and "fixed", i.e., plot symbols have the same size for all studies or represent the weight o
scale.diamond
A numerical value giving the amount by which the diamond representing pooled treatment effects should be scaled relative to the default.
scale.square
A numerical value giving the amount by which the square representing treatment effects in individual studies should be scaled relative to the default.
...
Graphical parameters as in par may also be passed as arguments.
col.i
The color for individual study results and confidence limits.

Details

A forest plot, also called confidence interval plot, is drawn in the active graphics window. Sub-group analyses are conducted and displayed in the plot if byvar is not missing.

See Also

metabin, metacont, metagen

Examples

Run this code
data(Olkin95)
meta1 <- metabin(event.e, n.e, event.c, n.c,
                 data=Olkin95, subset=c(41,47,51,59),
                 sm="RR", meth="I")

plot(meta1)
plot(meta1, byvar=c(1,2,1,2), bylab="label")
plot(meta1, byvar=1:4, xlim=c(0.02, 10))

Run the code above in your browser using DataLab