-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathforest.metabind.Rd
More file actions
281 lines (227 loc) · 9.13 KB
/
Copy pathforest.metabind.Rd
File metadata and controls
281 lines (227 loc) · 9.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest.metabind.R
\name{forest.metabind}
\alias{forest.metabind}
\title{Forest plot to display the result of a meta-analysis}
\usage{
\method{forest}{metabind}(
x,
leftcols,
leftlabs,
rightcols = c("effect", "ci"),
rightlabs,
common = x$common,
random = x$random,
overall = x$overall,
subgroup = FALSE,
hetstat = FALSE,
overall.hetstat = x$overall.hetstat,
prediction = x$prediction,
layout = gs("layout"),
lab.NA = "",
col.square,
col.square.lines,
col.circle,
col.circle.lines,
col.diamond,
col.diamond.common,
col.diamond.random,
col.diamond.lines,
col.diamond.lines.common,
col.diamond.lines.random,
col.predict,
col.predict.lines,
type = NULL,
type.common = NULL,
type.random = NULL,
type.predict = NULL,
digits = gs("digits.forest"),
digits.se = gs("digits.se"),
digits.stat = gs("digits.stat"),
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.tau = gs("digits.tau"),
digits.I2 = max(gs("digits.I2") - 1, 0),
scientific.pval = gs("scientific.pval"),
big.mark = gs("big.mark"),
print.subgroup.labels = x$with.subgroups,
addrow.subgroups = print.subgroup.labels,
smlab,
calcwidth.pooled = overall,
warn.deprecated = gs("warn.deprecated"),
...
)
}
\arguments{
\item{x}{An object of class \code{\link{metabind}}.}
\item{leftcols}{A character vector specifying (additional) columns
to be plotted on the left side of the forest plot or a logical
value (see Details).}
\item{leftlabs}{A character vector specifying labels for
(additional) columns on left side of the forest plot (see
Details).}
\item{rightcols}{A character vector specifying (additional) columns
to be plotted on the right side of the forest plot or a logical
value (see Details).}
\item{rightlabs}{A character vector specifying labels for
(additional) columns on right side of the forest plot (see
Details).}
\item{common}{A logical indicating whether common effect estimates
should be plotted.}
\item{random}{A logical indicating whether random effects estimates
should be plotted.}
\item{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.}
\item{subgroup}{A logical indicating whether subgroup results
should be shown in forest plot. This argument is useful in a
meta-analysis with subgroups if summaries should not be plotted
on group level.}
\item{hetstat}{Either a logical value indicating whether to print
results for heterogeneity measures at all or a character string
(see Details).}
\item{overall.hetstat}{A logical value indicating whether to print
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.}
\item{prediction}{A logical indicating whether prediction
interval(s) should be printed.}
\item{layout}{A character string specifying the layout of the
forest plot (see \code{\link{forest.meta}}).}
\item{lab.NA}{A character string to label missing values.}
\item{col.square}{The colour for squares reflecting study's weight
in the meta-analysis.}
\item{col.square.lines}{The colour for the outer lines of squares
reflecting study's weight in the meta-analysis.}
\item{col.circle}{The colour for circles reflecting study weights
in the meta-analysis.}
\item{col.circle.lines}{The colour for the outer lines of circles
reflecting study's weight in the meta-analysis.}
\item{col.diamond}{The colour of diamonds representing the results
for common effect and random effects models.}
\item{col.diamond.common}{The colour of diamonds for common effect
estimates.}
\item{col.diamond.random}{The colour of diamonds for random effects
estimates.}
\item{col.diamond.lines}{The colour of the outer lines of diamonds
representing the results for common effect and random effects
models.}
\item{col.diamond.lines.common}{The colour of the outer lines of
diamond for common effect estimates.}
\item{col.diamond.lines.random}{The colour of the outer lines of
diamond for random effects estimates.}
\item{col.predict}{Background colour of prediction intervals.}
\item{col.predict.lines}{Colour of outer lines of prediction
intervals.}
\item{type}{A character string or vector specifying how to
plot estimates.}
\item{type.common}{A single character string specifying how to
plot common effect estimates.}
\item{type.random}{A single character string specifying how to
plot random effects estimates.}
\item{type.predict}{A single character string specifying how to
plot prediction intervals.}
\item{digits}{Minimal number of significant digits for treatment
effects, see \code{print.default}.}
\item{digits.se}{Minimal number of significant digits for standard
errors, see \code{print.default}.}
\item{digits.stat}{Minimal number of significant digits for z- or
t-statistic for test of overall effect, see \code{print.default}.}
\item{digits.pval}{Minimal number of significant digits for p-value
of overall treatment effect, see \code{print.default}.}
\item{digits.pval.Q}{Minimal number of significant digits for
p-value of heterogeneity test, see \code{print.default}.}
\item{digits.Q}{Minimal number of significant digits for
heterogeneity statistic Q, see \code{print.default}.}
\item{digits.tau2}{Minimal number of significant digits for
between-study variance, see \code{print.default}.}
\item{digits.tau}{Minimal number of significant digits for square
root of between-study variance, see \code{print.default}.}
\item{digits.I2}{Minimal number of significant digits for I-squared
statistic, see \code{print.default}.}
\item{scientific.pval}{A logical specifying whether p-values should
be printed in scientific notation, e.g., 1.2345e-01 instead of
0.12345.}
\item{big.mark}{A character used as thousands separator.}
\item{print.subgroup.labels}{A logical indicating whether subgroup
label should be printed.}
\item{addrow.subgroups}{A logical value indicating whether an empty
row is printed between results for subgroups.}
\item{smlab}{A label for the summary measurex (printed at top of
figure).}
\item{calcwidth.pooled}{A logical indicating whether text for
common effect and random effects model should be considered to
calculate width of the column with study labels.}
\item{warn.deprecated}{A logical indicating whether warnings should
be printed if deprecated arguments are used.}
\item{\dots}{Additional graphical arguments (passed on to
\code{\link{forest.meta}}).}
}
\description{
Draws a forest plot in the active graphics window (using grid
graphics system).
}
\details{
A forest plot, also called confidence interval plot, is drawn in
the active graphics window. The forest functions in R package
\bold{meta} are based on the grid graphics system. In order to
print the forest plot, resize the graphics window and either use
\code{\link{dev.copy2eps}} or \code{\link{dev.copy2pdf}}. Another
possibility is to create a file using \code{\link{pdf}},
\code{\link{png}}, or \code{\link{svg}} and to specify the width
and height of the graphic (see \code{\link{forest.meta}} examples).
The arguments \code{leftcols} and \code{rightcols} can be used to
specify columns which are plotted on the left and right side of the
forest plot, respectively.
The arguments \code{leftlabs} and \code{rightlabs} can be used to
specify column headings which are plotted on left and right side of
the forest plot, respectively. For certain columns predefined
labels exist. For other columns, the column name will be used as a
label. It is possible to only provide labels for new columns (see
\code{\link{forest.meta}} examples). Otherwise the length of
\code{leftlabs} and \code{rightlabs} must be the same as the number
of printed columns, respectively. The value \code{NA} can be used
to specify columns which should use default labels.
Argument \code{hetstat} can be a character string to specify where
to print heterogeneity information:
\itemize{
\item row with results for common effect model (\code{hetstat =
"common"}),
\item row with results for random effects model (\code{hetstat =
"random"}),
\item rows with 'study' information (\code{hetstat = "study"}).
}
Otherwise, information on heterogeneity is printed in dedicated rows.
}
\examples{
data(Fleiss1993cont)
# Add some (fictitious) grouping variables:
#
Fleiss1993cont$age <- c(55, 65, 55, 65, 55)
Fleiss1993cont$region <- c("Europe", "Europe", "Asia", "Asia", "Europe")
ma <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
data = Fleiss1993cont, sm = "SMD")
# Conduct two subgroup analyses
#
ma1 <- update(ma, subgroup = age, subgroup.name = "Age group")
ma2 <- update(ma, subgroup = region, subgroup.name = "Region")
# Combine subgroup meta-analyses and show forest plot with subgroup
# results
#
mb <- metabind(ma1, ma2)
mb
forest(mb)
}
\seealso{
\code{\link{forest.meta}}, \code{\link{metabin}},
\code{\link{metacont}}, \code{\link{metagen}},
\code{\link{metabind}}, \code{\link{settings.meta}}
}
\author{
Guido Schwarzer \email{guido.schwarzer@uniklinik-freiburg.de}
}
\keyword{hplot}