drapery  R Documentation 
Draw a drapery plot with (scaled) pvalue curves for individual studies and metaanalysis estimates.
drapery( x, type = "zvalue", layout = "grayscale", study.results = TRUE, lty.study = 1, lwd.study = 1, col.study = "darkgray", labels, col.labels = "black", cex.labels = 0.7, subset.labels, srt.labels, common = x$common, random = x$random, lty.common = 1, lwd.common = max(3, lwd.study), col.common = "blue", lty.random = 1, lwd.random = lwd.common, col.random = "red", sign = NULL, lty.sign = 1, lwd.sign = 1, col.sign = "black", prediction = random, col.predict = "lightblue", alpha = if (type == "zvalue") c(0.001, 0.01, 0.05, 0.1) else c(0.01, 0.05, 0.1), lty.alpha = 2, lwd.alpha = 1, col.alpha = "black", cex.alpha = 0.7, col.null.effect = "black", legend = TRUE, pos.legend = "topleft", bg = "white", bty = "o", backtransf = x$backtransf, xlab, ylab, xlim, ylim, lwd.max = 2.5, lwd.study.weight = if (random) "random" else "common", at = NULL, n.grid = if (type == "zvalue") 10000 else 1000, mar = c(5.1, 4.1, 4.1, 4.1), plot = TRUE, warn.deprecated = gs("warn.deprecated"), fixed, lwd.fixed, lty.fixed, col.fixed, ... )
x 
An object of class 
type 
A character string indicating whether to plot test
statistics ( 
layout 
A character string for the line layout of individual
studies: 
study.results 
A logical indicating whether results for individual studies should be shown in the figure. 
lty.study 
Line type for individual studies. 
lwd.study 
Line width for individual studies. 
col.study 
Colour of lines for individual studies. 
labels 
A logical or character string indicating whether
study labels should be shown at the top of the drapery plot;
either 
col.labels 
Colour of study labels. 
cex.labels 
The magnification for study labels. 
subset.labels 
A vector specifying which study labels should be shown in the drapery plot. 
srt.labels 
A numerical vector or single numeric (between 0 and 90) specifying the angle to rotate study labels; see Details. 
common 
A logical indicating whether to show result for the common effect model. 
random 
A logical indicating whether to show result for the random effects model. 
lty.common 
Line type for common effect metaanalysis. 
lwd.common 
Line width for common effect metaanalysis. 
col.common 
Colour of lines for common effect metaanalysis. 
lty.random 
Line type for random effects metaanalysis. 
lwd.random 
Line width for random effects metaanalysis. 
col.random 
Colour of lines for random effects metaanalysis. 
sign 
Significance level used to highlight significant values in curves. 
lty.sign 
Line type for significant values. 
lwd.sign 
Line width for significant values. 
col.sign 
Line colour for significant values. 
prediction 
A logical indicating whether to show prediction region. 
col.predict 
Colour of prediction region 
alpha 
Horizonal lines are printed for the specified alpha values. 
lty.alpha 
Line type of horizonal lines for alpha values. 
lwd.alpha 
Line width of horizonal lines for alpha values. 
col.alpha 
Colour of horizonal lines for alpha values. 
cex.alpha 
The magnification for the text of the alpha 
col.null.effect 
Colour of vertical line indicating null effect. 
legend 
A logical indicating whether a legend should be printed. 
pos.legend 
A character string with position of legend (see

bg 
Background colour of legend (see 
bty 
Type of the box around the legend; either 
backtransf 
A logical indicating whether results should be
back transformed on the xaxis. For example, if 
xlab 
A label for the xaxis. 
ylab 
A label for the yaxis. 
xlim 
The x limits (min, max) of the plot. 
ylim 
The y limits (min, max) of the plot (ignored if

lwd.max 
The maximum line width (only considered if argument

lwd.study.weight 
A character string indicating whether to
determine line width for individual studies using weights from
common effect ( 
at 
Points at which tickmarks are to be drawn on the xaxis. 
n.grid 
The number of grid points to calculate the pvalue or test statistic functions. 
mar 
Physical plot margin, see 
plot 
A logical indicating whether to generate a figure. 
warn.deprecated 
A logical indicating whether warnings should be printed if deprecated arguments are used. 
fixed 
Deprecated argument (replaced by 'common'). 
lwd.fixed 
Deprecated argument (replaced by 'lwd.common'). 
lty.fixed 
Deprecated argument (replaced by 'lty.common'). 
col.fixed 
Deprecated argument (replaced by 'col.common'). 
... 
Graphical arguments as in 
The concept of a pvalue function, also called confidence curve, goes back to Birnbaum (1961). A drapery plot, showing pvalue functions (or a scaled version based on the corresponding test statistics) for individual studies as well as metaanalysis estimates, is drawn in the active graphics window. Furthermore, a prediction region for a single future study is shown as a shaded area. In contrast to a forest plot, a drapery plot does not provide information for a single confidence level however for any confidence level.
Argument type
can be used to either show pvalue functions
(Birnbaum, 1961) or a scaled version (Infanger, 2019) with test
statistics (default).
Argument layout
determines how curves for individual studies
are presented:
darker gray tones with increasing precision (layout =
"grayscale"
)
thicker lines with increasing precision (layout =
"linewidth"
)
equal lines (layout = "equal"
)
Argument labels
determines how curves of individual studies
are labelled:
number of the study in the (unsorted) forest plot / printout
of a metaanalysis (labels = "id"
)
study labels provided by argument studlab
in
metaanalysis functions (labels = "studlab"
)
no study labels (labels = FALSE
)
By default, study labels are used (labels = "studlab"
) if no
label has more than three characters; otherwise IDs are used
(labels = "id"
). The connection between IDs and study labels
(among other information) is part of a data frame which is
invisibly returned (if argument study.results = TRUE
).
Argument srt.labels
can be used to change the rotation of
IDs or study labels. By default, study labels are rotated by +/ 45
degrees if at least one study label has more than three characters;
otherwise labels are not rotated.
If labels = "studlab"
, labels are rotated by 45 degrees for
studies with a treatment estimate below the common effect estimate
and otherwise by 45 degrees.
Gerta Rücker sc@imbi.unifreiburg.de, Guido Schwarzer sc@imbi.unifreiburg.de
Birnbaum A (1961): Confidence Curves: An Omnibus Technique for Estimation and Testing Statistical Hypotheses. Journal of the American Statistical Association, 56, 246–9
Infanger D and SchmidtTrucksäss A (2019): P value functions: An underused method to present research results and to promote quantitative reasoning Statistics in Medicine, 38, 4189–97
forest
, radial
data("lungcancer") m1 < metainc(d.smokers, py.smokers, d.nonsmokers, py.nonsmokers, data = lungcancer, studlab = study) # Drapery plot # drapery(m1, xlim = c(0.5, 50)) ## Not run: data(Fleiss1993bin) m2 < metabin(d.asp, n.asp, d.plac, n.plac, data = Fleiss1993bin, studlab = paste(study, year), sm = "OR", random = FALSE) # Produce drapery plot and print data frame with connection between # IDs and study labels # (drapery(m2)) # For studies with a significant effect (p < 0.05), show # study labels and print labels and lines in red # drapery(m2, labels = "studlab", subset.labels = pval < 0.05, srt.labels = 0, col.labels = "red", col.study = ifelse(pval < 0.05, "red", "darkgray")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.