View source: R/forest.netcomparison.R
forest.netcomparison | R Documentation |
Draws a forest plot in the active graphics window (using grid graphics system).
## S3 method for class 'netcomparison'
forest(
x,
pooled = ifelse(x$random, "random", "common"),
leftcols = c("studlab", "treat1", "treat2"),
leftlabs = c("Comparison", "Trt 1", "Trt 2"),
rightcols = c("effect", "ci", "statistic", "pval"),
rightlabs = c(NA, NA, "z", "p-value"),
nchar.comps = x$nchar.trts,
digits = gs("digits.forest"),
digits.stat = gs("digits.stat"),
digits.pval = gs("digits.pval"),
smlab = NULL,
backtransf = x$backtransf,
lab.NA = ".",
weight.study = "same",
...
)
## S3 method for class 'netcomparison'
plot(x, ...)
x |
An object of class |
pooled |
A character string indicating whether results for the
common ( |
leftcols |
A character vector specifying (additional) columns
to be plotted on the left side of the forest plot or a logical
value (see |
leftlabs |
A character vector specifying labels for
(additional) columns on left side of the forest plot (see
|
rightcols |
A character vector specifying (additional) columns
to be plotted on the right side of the forest plot or a logical
value (see |
rightlabs |
A character vector specifying labels for
(additional) columns on right side of the forest plot (see
|
nchar.comps |
A numeric defining the minimum number of characters used to create unique names for components. |
digits |
Minimal number of significant digits for treatment
effects and confidence intervals, see |
digits.stat |
Minimal number of significant digits for tests
of overall effect, see |
digits.pval |
Minimal number of significant digits for p-value
of overall effects, see |
smlab |
A label printed at top of figure. By default, text indicating either common or random effects model is printed. |
backtransf |
A logical indicating whether results should be
back transformed in forest plots. If |
lab.NA |
A character string to label missing values. |
weight.study |
A character string indicating weighting used to determine size of squares or diamonds. |
... |
Additional arguments for |
A forest plot, also called confidence interval plot, is drawn in
the active graphics window. For more information see help page of
forest.meta
function.
Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de
netcomparison
, netcomb
,
discomb
, forest.meta
data(Linde2016)
# Only consider studies including Face-to-face PST (to reduce
# runtime of example)
#
face <- subset(Linde2016, id %in% c(16, 24, 49, 118))
# Conduct random effects network meta-analysis
#
net1 <- netmeta(lnOR, selnOR, treat1, treat2, id,
data = face, ref = "placebo", sm = "OR", common = FALSE)
# Additive model for treatment components (with placebo as inactive
# treatment)
#
nc1 <- netcomb(net1, inactive = "placebo")
# Some comparisons
#
t1 <- c("F + TCA", "F + Plac", "SSRI + Plac + TCA")
t2 <- c("UC", "Plac", "UC")
#
netcomparison(nc1, t1, t2)
#
forest(netcomparison(nc1, t1, t2))
forest(netcomparison(nc1, t1, t2), nchar.comps = 4)
forest(netcomparison(nc1, c("F", "TCA"), "UC"), nchar.comps = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.