forest.netsplit: Forest plot for direct and indirect evidence

View source: R/forest.netsplit.R

forest.netsplitR Documentation

Forest plot for direct and indirect evidence

Description

Forest plot to show direct and indirect evidence in network meta-analysis. Furthermore, estimates from network meta-analysis as well as prediction intervals can be printed.

Usage

## S3 method for class 'netsplit'
forest(
  x,
  pooled = ifelse(x$x$random, "random", "common"),
  show = "both",
  subgroup = "comparison",
  overall = TRUE,
  direct = TRUE,
  indirect = TRUE,
  prediction = x$prediction,
  only.reference = FALSE,
  sortvar = NULL,
  subset = NULL,
  text.overall = "Network estimate",
  text.direct = "Direct estimate",
  text.indirect = "Indirect estimate",
  text.predict = "Prediction interval",
  type.overall,
  type.direct,
  type.indirect,
  col.square = "gray",
  col.square.lines = col.square,
  col.inside = "white",
  col.diamond = "gray",
  col.diamond.lines = "black",
  col.predict = "red",
  col.predict.lines = "black",
  equal.size = TRUE,
  leftcols,
  leftlabs,
  rightcols = c("effect", "ci"),
  rightlabs = NULL,
  digits = gs("digits.forest"),
  digits.prop = max(gs("digits.pval") - 2, 2),
  backtransf = x$backtransf,
  lab.NA = "",
  smlab,
  ...
)

## S3 method for class 'netsplit'
plot(x, ...)

Arguments

x

An object of class netsplit.

pooled

A character string indicating whether results for the common ("common") or random effects model ("random") should be plotted. Can be abbreviated.

show

A character string indicating which comparisons should be printed (see Details).

subgroup

A character string indicating which layout should be used in forest plot: subgroups by comparisons ("comparison") or subgroups by estimates ("estimate"). Can be abbreviated.

overall

A logical indicating whether network meta-analysis estimates should be printed.

direct

A logical indicating whether direct estimates should be printed.

indirect

A logical indicating whether indirect estimates should be printed.

prediction

A logical indicating whether prediction intervals should be printed.

only.reference

A logical indicating whether only comparisons with the reference group should be printed.

sortvar

An optional vector used to sort comparisons (must be of same length as the total number of comparisons).

subset

An optional logical vector specifying a subset of comparisons to print (must be of same length as the total number of comparisons) .

text.overall

A character string used in the plot to label the network estimates.

text.direct

A character string used in the plot to label the direct estimates.

text.indirect

A character string used in the plot to label the indirect estimates.

text.predict

A character string used in the plot to label the prediction interval.

type.overall

A character string specifying how to plot treatment effects and confidence intervals for the overall network evidence.

type.direct

A character string specifying how to plot treatment effects and confidence intervals for the direct evidence.

type.indirect

A character string specifying how to plot treatment effects and confidence intervals for the indirect evidence.

col.square

The colour for squares.

col.square.lines

The colour for the outer lines of squares.

col.inside

The colour for results and confidence limits if confidence limits are completely within squares squares.

col.diamond

The colour of diamonds.

col.diamond.lines

The colour of the outer lines of diamonds.

col.predict

Background colour of prediction intervals.

col.predict.lines

Colour of outer lines of prediction intervals.

equal.size

A logical indicating whether all squares should be of equal size. Otherwise, the square size is proportional to the precision of estimates.

leftcols

A character vector specifying columns to be plotted on the left side of the forest plot (see Details).

leftlabs

A character vector specifying labels for columns on left side of the forest plot.

rightcols

A character vector specifying columns to be plotted on the right side of the forest plot (see Details).

rightlabs

A character vector specifying labels for columns on right side of the forest plot.

digits

Minimal number of significant digits for treatment effects and confidence intervals, see print.default.

digits.prop

Minimal number of significant digits for the direct evidence proportion.

backtransf

A logical indicating whether results should be back transformed in forest plots. If backtransf = TRUE, results for sm = "OR" are presented as odds ratios rather than log odds ratios, for example.

lab.NA

A character string to label missing values.

smlab

A label printed at top of figure. By default, text indicating either common or random effects model is printed.

...

Additional arguments for forest.meta function.

Details

A forest plot, also called confidence interval plot, is drawn in the active graphics window.

The arguments leftcols and rightcols can be used to specify columns which are plotted on the left and right side of the forest plot, respectively. If argument rightcols is FALSE, no columns will be plotted on the right side.

If direct estimates are included in the forest plot (direct = TRUE, default), the following columns will be printed on the left side of the forest plot: the comparisons (column "studlab" in forest.meta), number of pairwise comparisons ("k"), direct evidence proportion ("k"), and I^2 from pairwise comparison ("I2").

If direct estimates are not included in the forest plot (direct = FALSE), only the comparisons ("studlab") are printed on the left side of the forest plot.

For more information see help page of forest.meta function.

Argument show determines which comparisons are printed:

“all” All comparisons
“both” Only comparisons contributing both direct and indirect evidence
“with.direct” Comparisons providing direct evidence
“direct.only” Comparisons providing only direct evidence
“indirect.only” Comparisons providing only indirect evidence

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

See Also

forest.meta

Examples

data(Senn2013)

# Only consider first five studies (to reduce runtime of example)
#
studies <- unique(Senn2013$studlab)
Senn2013.5 <- subset(Senn2013, studlab %in% studies[1:5])

net1 <- netmeta(TE, seTE, treat1.long, treat2.long,
  studlab, data = Senn2013.5, common = FALSE, reference = "plac")
#
ns1 <- netsplit(net1)

# Forest plot showing comparisons contributing both direct and
# indirect evidence
#
forest(ns1, fontsize = 6, spacing = 0.5, addrow.subgroups = FALSE)

## Not run: 
# Forest plot showing comparisons contributing direct evidence
#
forest(ns1, fontsize = 6, spacing = 0.5, addrow.subgroups = FALSE,
  show = "with.direct")


# Forest plot only showing network estimates compared to reference
# group and prediction intervals
#
forest(ns1, fontsize = 8, spacing = 0.75, show = "all",
  only.reference = TRUE, prediction = TRUE,
  direct = FALSE, indirect = FALSE)

## End(Not run)


netmeta documentation built on June 23, 2024, 9:06 a.m.