Usage
forest(x, ...)# S3 method for meta
forest(x, sortvar, studlab=TRUE,
layout=gs("layout"),
comb.fixed=x$comb.fixed, comb.random=x$comb.random,
overall=TRUE,
text.fixed=NULL,
text.random=NULL,
lty.fixed=2, lty.random=3,
prediction=x$prediction,
text.predict=NULL,
print.subgroup.labels=TRUE,
bylab=x$bylab, print.byvar=x$print.byvar,
byseparator=gs("byseparator"),
text.fixed.w=text.fixed, text.random.w=text.random, bysort=FALSE,
pooled.totals=comb.fixed|comb.random, pooled.events=FALSE,
pooled.times=FALSE, study.results=TRUE,
xlab="", xlab.pos=ref,
smlab=NULL, smlab.pos=ref, xlim="symmetric",
allstudies=TRUE,
weight.study, weight.subgroup,
pscale=x$pscale, irscale=x$irscale, irunit=x$irunit,
ref=ifelse(backtransf & is.relative.effect(x$sm), 1, 0),
leftcols=NULL, rightcols=NULL,
leftlabs=NULL, rightlabs=NULL,
lab.e=x$label.e, lab.c=x$label.c,
lab.e.attach.to.col=NULL, lab.c.attach.to.col=NULL,
label.right=x$label.right, label.left=x$label.left, bottom.lr=TRUE,
lab.NA=".",
lab.NA.effect="",
lwd=1,
at=NULL, label=TRUE,
type.study="square", type.fixed="diamond", type.random=type.fixed,
type.subgroup=ifelse(study.results, "diamond", "square"),
col.study="black",
col.square="gray", col.square.lines=col.square,
col.inside="white",
col.diamond="gray",
col.diamond.fixed=col.diamond, col.diamond.random=col.diamond,
col.diamond.lines="black",
col.diamond.lines.fixed=col.diamond.lines,
col.diamond.lines.random=col.diamond.lines,
col.inside.fixed=col.inside,
col.inside.random=col.inside,
col.predict="red", col.predict.lines="black",
col.by="darkgray",
col.label.right="black", col.label.left="black",
hetstat = print.I2 | print.tau2 | print.Q | print.pval.Q | print.Rb,
overall.hetstat = overall & hetstat,
hetlab = "Heterogeneity: ",
print.I2 = comb.fixed | comb.random,
print.I2.ci = FALSE,
print.tau2 = comb.fixed | comb.random,
print.Q = FALSE,
print.pval.Q = comb.fixed | comb.random,
print.Rb = FALSE,
print.Rb.ci = FALSE,
##
test.overall=gs("test.overall"),
test.overall.fixed=comb.fixed&overall&test.overall,
test.overall.random=comb.random&overall&test.overall,
label.test.overall.fixed, label.test.overall.random,
##
test.subgroup,
test.subgroup.fixed, test.subgroup.random,
print.Q.subgroup=print.Q,
label.test.subgroup.fixed, label.test.subgroup.random,
##
test.effect.subgroup,
test.effect.subgroup.fixed, test.effect.subgroup.random,
label.test.effect.subgroup.fixed,
label.test.effect.subgroup.random,
##
fontsize=12,
fs.heading = fontsize,
fs.fixed, fs.random, fs.predict,
fs.fixed.labels, fs.random.labels, fs.predict.labels,
fs.study = fontsize, fs.study.labels = fs.study,
fs.hetstat, fs.test.overall,
fs.test.subgroup, fs.test.effect.subgroup,
fs.axis = fontsize, fs.smlab = fontsize, fs.xlab = fontsize,
fs.lr = fontsize,
ff.heading = "bold",
ff.fixed, ff.random, ff.predict,
ff.fixed.labels, ff.random.labels, ff.predict.labels,
ff.study = "plain", ff.study.labels = ff.study,
ff.hetstat, ff.test.overall,
ff.test.subgroup, ff.test.effect.subgroup,
ff.axis = "plain", ff.smlab = "bold", ff.xlab = "plain",
ff.lr = "plain",
#
squaresize=0.8,
#
plotwidth = if (layout != "JAMA") "6cm" else "8cm",
colgap = "2mm",
colgap.left = colgap, colgap.right = colgap,
colgap.studlab = colgap.left, colgap.forest = colgap,
colgap.forest.left = colgap.forest,
colgap.forest.right = colgap.forest,
#
calcwidth.pooled=TRUE,
calcwidth.fixed=calcwidth.pooled,
calcwidth.random=calcwidth.pooled,
calcwidth.predict=FALSE,
calcwidth.hetstat=FALSE, calcwidth.tests=FALSE,
#
just=if (layout != "JAMA") "right" else "left",
just.studlab="left", just.addcols="center",
just.addcols.left=just.addcols, just.addcols.right=just.addcols,
#
addrow, addrow.overall, addrow.subgroups,
#
new=TRUE,
#
backtransf=x$backtransf,
digits=gs("digits.forest"), digits.se=gs("digits.se"),
digits.zval=gs("digits.zval"),
digits.pval=max(gs("digits.pval")-2, 2),
digits.pval.Q=max(gs("digits.pval.Q")-2, 2),
digits.Q=gs("digits.Q"),
digits.tau2=gs("digits.tau2"),
digits.I2=max(gs("digits.I2")-1, 0),
digits.weight=gs("digits.weight"),
#
digits.mean = NULL, digits.sd = NULL,
digits.cor = NULL, digits.time = NULL,
#
col.i=col.study, weight=weight.study,
...)
Arguments
x
An object of class meta
.
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. A vector with study labels can also be
provided (must be of same length as x$TE
then).
layout
A character string specifying the layout of the forest
plot (see Details).
comb.fixed
A logical indicating whether fixed effect estimate
should be plotted.
comb.random
A logical indicating whether random effects estimate
should be plotted.
overall
A logical indicating whether overall summaries should
be plotted. This argument is useful in a meta-analysis with
subgroups if summaries should only be plotted on group level.
text.fixed
A character string used in the plot to label the
pooled fixed effect estimate.
text.random
A character string used in the plot to label the
pooled random effects estimate.
lty.fixed
Line type (pooled fixed effect estimate).
lty.random
Line type (pooled random effects estimate).
prediction
A logical indicating whether a prediction interval
should be printed.
text.predict
A character string used in the plot to label the
prediction interval.
print.subgroup.labels
A logical indicating whether subgroup
label should be printed.
bylab
A character string with a label for the grouping variable.
print.byvar
A logical indicating whether the name of the grouping
variable should be printed in front of the group labels.
byseparator
A character string defining the separator between
label and levels of grouping variable.
text.fixed.w
A character string to label the pooled fixed
effect estimate within subgroups, or a character vector of same
length as number of subgroups with corresponging labels.
text.random.w
A character string to label the pooled random
effect estimate within subgroups, or a character vector of same
length as number of subgroups with corresponging labels.
bysort
A logical indicating whether groups should be ordered
alphabetically.
pooled.totals
A logical indicating whether total number of
observations should be given in the figure.
pooled.events
A logical indicating whether total number of
events should be given in the figure.
pooled.times
A logical indicating whether total person time
at risk should be given in the figure.
study.results
A logical indicating whether results for
individual studies should be shown in the figure (useful to only
plot subgroup results).
xlab
A label for the x-axis.
xlab.pos
A numeric specifying the center of the label
on the x-axis.
smlab
A label for the summary measurex (printed at top of figure).
smlab.pos
A numeric specifying the center of the label
for the summary measure.
xlim
The x limits (min,max) of the plot, or the character "s"
to produce symmetric forest plots.
allstudies
A logical indicating whether studies with inestimable
treatment effects should be plotted.
weight.study
A character string indicating weighting used to
determine size of squares or diamonds (argument type.study
)
to plot individual study results. One of missing, "same"
,
"fixed"
, or "random"
, can be abbreviated. Plot
symbols have the same size for all studies or represent study
weights from fixed effect or random effects model.
weight.subgroup
A character string indicating weighting used
to determine size of squares or diamonds (argument
type.subgroup
) to plot subgroup results. One of missing,
"same"
, or "weight"
, can be abbreviated. Plot
symbols have the same size for all subgroup results or represent
subgroup weights from fixed effect or random effects model.
pscale
A numeric giving scaling factor for printing of single
event probabilities, i.e. if argument sm
is equal to
"PLOGIT"
, "PLN"
, "PRAW"
, "PAS"
, or
"PFT"
.
irscale
A numeric defining a scaling factor for printing of
rates, i.e. if argument sm
is equal to "IR"
,
"IRLN"
, "IRS"
, or "IRFT"
.
irunit
A character specifying the time unit used to calculate
rates, e.g. person-years.
ref
A numerical giving the reference value to be plotted as a
line in the forest plot. No reference line is plotted if argument
ref
is equal to NA
.
leftcols
A character vector specifying (additional) columns
to be plotted on the left side of the forest plot or a logical value
(see Details).
rightcols
A character vector specifying (additional) columns
to be plotted on the right side of the forest plot or a logical
value (see Details).
leftlabs
A character vector specifying labels for (additional)
columns on left side of the forest plot (see Details).
rightlabs
A character vector specifying labels for (additional)
columns on right side of the forest plot (see Details).
lab.e
Label to be used for experimental group in table
heading.
lab.c
Label to be used for control group in table
heading.
lab.e.attach.to.col
A character specifying the column name where
label lab.e
should be attached to in table heading.
lab.c.attach.to.col
A character specifying the column name where
label lab.c
should be attached to in table heading.
label.left
Graph label on left side of forest plot.
label.right
Graph label on right side of forest plot.
bottom.lr
A logical indicating whether labels on right
and left side should be printed at bottom or top of forest plot.
lab.NA
A character string to label missing values.
lab.NA.effect
A character string to label missing values in
individual treatment estimates and confidence intervals.
at
The points at which tick-marks are to be drawn, see
grid.xaxis
.
label
A logical value indicating whether to draw the
labels on the tick marks, or an expression or character vector which
specify the labels to use. See grid.xaxis
. type.study
A character string or vector specifying how to
plot treatment effects and confidence intervals for individual
studies (see Details).
type.fixed
A character string specifying how to plot
treatment effect and confidence interval for fixed effect
meta-analysis (see Details).
type.random
A character string specifying how to plot
treatment effect and confidence interval for random effects
meta-analysis (see Details).
type.subgroup
A character string specifying how to plot
treatment effect and confidence interval for subgroup results (see
Details).
col.study
The colour for individual study results and
confidence limits.
col.inside
The colour for individual study results and
confidence limits if confidence limits are completely within
squares.
col.square
The colour for squares reflecting study's weight in
the meta-analysis.
col.square.lines
The colour for the outer lines of squares
reflecting study's weight in the meta-analysis.
col.diamond
The colour of diamonds representing the results for
fixed effect and random effects models.
col.diamond.fixed
The colour of diamonds for fixed effect estimates.
col.diamond.random
The colour of diamonds for random effects estimates.
col.diamond.lines
The colour of the outer lines of diamonds
representing the results for fixed effect and random effects models.
col.diamond.lines.fixed
The colour of the outer lines of
diamond for fixed effect estimate.
col.diamond.lines.random
The colour of the outer lines of
diamond for random effects estimate.
col.inside.fixed
The colour for result of fixed effect
meta-analysis if confidence limit lies completely within square.
col.inside.random
The colour for result of random effects
meta-analysis if confidence limit lies completely within square.
col.predict
Background colour of prediction interval.
col.predict.lines
Colour of outer lines of prediction interval.
col.by
The colour to print information on subgroups.
col.label.right
The colour for label on right side of null
effect.
col.label.left
The colour for label on left side of null
effect.
hetstat
A logical value indicating whether to print results for
heterogeneity measures at all.
overall.hetstat
A logical value indicating whether to print
results for heterogeneity measures for overall treatment
comparisons. This argument is useful in a meta-analysis with
subgroups if heterogeneity statistics should only be printed on
subgroup level.
hetlab
Label printed in front of results for heterogeneity
measures.
print.I2
A logical value indicating whether to print the value
of the I-squared statistic.
print.I2.ci
A logical value indicating whether to print the
confidence interval of the I-squared statistic.
print.tau2
A logical value indicating whether to print the value
of the between-study variance tau-squared.
print.Q
A logical value indicating whether to print the value
of the heterogeneity statistic Q.
print.pval.Q
A logical value indicating whether to print the
p-value of the heterogeneity statistic Q.
print.Rb
A logical value indicating whether to print the value
of the I-squared statistic.
print.Rb.ci
A logical value indicating whether to print the
confidence interval of the I-squared statistic.
test.overall
A logical value indicating whether to print
results of test for overall effect.
test.overall.fixed
A logical value indicating whether to
print results of test for overall effect (based on fixed effect
model).
test.overall.random
A logical value indicating whether to
print results of test for overall effect (based on random effects
model).
label.test.overall.fixed
Label printed in front of results of
test for overall effect (based on fixed effect model).
label.test.overall.random
Label printed in front of results
of test for overall effect (based on random effects model).
test.subgroup
A logical value indicating whether to print
results of test for subgroup differences.
test.subgroup.fixed
A logical value indicating whether to
print results of test for subgroup differences (based on fixed
effect model).
test.subgroup.random
A logical value indicating whether to
print results of test for subgroup differences (based on random
effects model).
print.Q.subgroup
A logical value indicating whether to print
the value of the heterogeneity statistic Q (test for subgroup
differences).
label.test.subgroup.fixed
Label printed in front of results
of test for subgroup differences (based on fixed effect model).
label.test.subgroup.random
Label printed in front of results
of test for subgroup differences (based on random effects model).
test.effect.subgroup
A logical value indicating whether to
print results of test for effect in subgroups.
test.effect.subgroup.fixed
A logical value indicating whether
to print results of test for effect in subgroups (based on fixed
effect model).
test.effect.subgroup.random
A logical value indicating
whether to print results of test for effect in subgroups (based on
random effects model).
label.test.effect.subgroup.fixed
Label printed in front of
results of test for effect in subgroups (based on fixed effect
model).
label.test.effect.subgroup.random
Label printed in front of
results of test for effect in subgroups (based on random effects
model).
fontsize
The size of text (in points), see gpar
. fs.heading
The size of text for column headings, see gpar
. fs.fixed
The size of text for results of fixed effect model, see gpar
. fs.random
The size of text for results of random effects model, see gpar
. fs.predict
The size of text for results of prediction interval, see gpar
. fs.fixed.labels
The size of text for label of fixed effect model, see gpar
. fs.random.labels
The size of text for label of random effects model, see gpar
. fs.predict.labels
The size of text for label of prediction interval, see gpar
. fs.study
The size of text for results of individual studies, see gpar
. fs.study.labels
The size of text for labels of individual studies, see gpar
. fs.hetstat
The size of text for heterogeneity measures, see gpar
. fs.test.overall
The size of text of test for overall effect, see gpar
. fs.test.subgroup
The size of text of test of subgroup differences, see gpar
. fs.test.effect.subgroup
The size of text of test of effect in subgroups, see gpar
. fs.axis
The size of text on x-axis, see gpar
. fs.smlab
The size of text of label for summary measure, see gpar
. fs.xlab
The size of text of label on x-axis, see gpar
. fs.lr
The size of text of label on left and right side of forest plot, see gpar
. ff.heading
The fontface for column headings, see gpar
. ff.fixed
The fontface of text for results of fixed effect model, see gpar
. ff.random
The fontface of text for results of random effects model, see gpar
. ff.predict
The fontface of text for results of prediction interval, see gpar
. ff.fixed.labels
The fontface of text for label of fixed effect model, see gpar
. ff.random.labels
The fontface of text for label of random effects model, see gpar
. ff.predict.labels
The fontface of text for label of prediction interval, see gpar
. ff.study
The fontface of text for results of individual studies, see gpar
. ff.study.labels
The fontface of text for labels of individual studies, see gpar
. ff.hetstat
The fontface of text for heterogeneity measures, see gpar
. ff.test.overall
The fontface of text of test for overall effect, see gpar
. ff.test.subgroup
The fontface of text for test of subgroup differences, see gpar
. ff.test.effect.subgroup
The fontface of text for test of effect in subgroups, see gpar
. ff.axis
The fontface of text on x-axis, see gpar
. ff.smlab
The fontface of text of label for summary measure, see gpar
. ff.xlab
The fontface of text of label on x-axis, see gpar
. ff.lr
The fontface of text of label on left and right side of forest plot, see gpar
. squaresize
A numeric used to increase or decrease the size of
squares in the forest plot.
plotwidth
Either a character string, e.g., "8cm", "60mm", or
"3inch", or a unit
object specifying width of
the forest plot. colgap
Either a character string or a
unit
object specifying gap between columns
printed on left and right side of forest plot. colgap.left
Either a character string or a
unit
object specifying gap between columns
printed on left side of forest plot. colgap.right
Either a character string or a
unit
object specifying gap between columns
printed on right side of forest plot. colgap.studlab
Either a character string or a
unit
object specifying gap between column with
study labels and subsequent column. colgap.forest
Either a character string or a
unit
object specifying gap between column
adjacent to forest plot and the forest plot. colgap.forest.left
Either a character string or a
unit
object specifying gap between column on
the left side of forest plot and the forest plot. colgap.forest.right
Either a character string or a
unit
object specifying gap between column on
the right side of forest plot and the forest plot. calcwidth.pooled
A logical indicating whether text for fixed
effect and random effects model should be considered to calculate
width of column with study labels, see next two arguments.
calcwidth.fixed
A logical indicating whether text given in
arguments text.fixed
and text.fixed.w
should be
considered to calculate width of column with study labels.
calcwidth.random
A logical indicating whether text given in
arguments text.random
and text.random.w
should be
considered to calculate width of column with study labels.
calcwidth.predict
A logical indicating whether text given in
argument text.predict
should be considered to calculate
width of column with study labels.
calcwidth.hetstat
A logical indicating whether text for
heterogeneity statistics should be considered to calculate width
of column with study labels.
calcwidth.tests
A logical indicating whether text for tests
of overall effect or subgroup differences should be considered to
calculate width of column with study labels.
just
Justification of text in all columns but columns
with study labels and additional variables (possible values:
"left", "right", "center").
just.studlab
Justification of text for study labels (possible
values: "left", "right", "center").
just.addcols
Justification of text for additional columns (possible
values: "left", "right", "center").
just.addcols.left
Justification of text for additional
columns on left side of forest plot (possible values: "left",
"right", "center"). Can be of same length as number of additional
columns on left side of forest plot.
just.addcols.right
Justification of text for additional
columns on right side of forest plot (possible values: "left",
"right", "center"). Can be of same length as number of additional
columns on right side of forest plot.
addrow
A logical value indicating whether an empty row is
printed above and below study results.
addrow.overall
A logical value indicating whether an emtpy
row is above overall meta-analysis results.
addrow.subgroups
A logical value indicating whether an empty
row is printed between results for subgroups.
new
A logical value indicating whether a new figure should
be printed in an existing graphics window.
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 and results for sm="ZCOR"
are
presented as correlations rather than Fisher's z transformed
correlations, for example.
digits
Minimal number of significant digits for treatment
effects, see print.default
.
digits.se
Minimal number of significant digits for standard
errors, see print.default
.
digits.zval
Minimal number of significant digits for z- or
t-statistic for test of overall effect, see print.default
.
digits.tau2
Minimal number of significant digits for
between-study variance, see print.default
.
digits.pval
Minimal number of significant digits for p-value
of overall treatment effect, see print.default
.
digits.pval.Q
Minimal number of significant digits for
p-value of heterogeneity test, see print.default
.
digits.Q
Minimal number of significant digits for
heterogeneity statistic Q, see print.default
.
digits.I2
Minimal number of significant digits for I-squared
statistic, see print.default
.
digits.weight
Minimal number of significant digits for
weights, see print.default
.
digits.mean
Minimal number of significant digits for means;
only applies to metacont
objects. digits.sd
Minimal number of significant digits for standard
deviations; only applies to metacont
objects. digits.cor
Minimal number of significant digits for
correlations; only applies to metacor
objects. digits.time
Minimal number of significant digits for times;
only applies to metainc
and metarate
objects. col.i
Deprecated argument (replaced by col.study
).
weight
Deprecated argument (replaced by weight.study
).
…
Additional graphical arguments (ignored at the moment).