View source: R/forest.netsplit.R
forest.netsplit | R Documentation |
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.
## 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, ...)
x |
An object of class |
pooled |
A character string indicating whether results for the
common ( |
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
( |
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 |
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 |
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 |
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 |
Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de
forest.meta
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.