ssfunnel {altmeta} | R Documentation |
Contour-Enhanced Sample-Size-Based Funnel Plot
Description
Generates contour-enhanced sample-size-based funnel plot for a meta-analysis of mean differences, standardized mean differences, (log) odds ratios, (log) relative risks, or risk differences.
Usage
ssfunnel(y, s2, n, data, type, alpha = c(0.1, 0.05, 0.01, 0.001),
log.ss = FALSE, sigma, p0, xlim, ylim, xlab, ylab,
cols.contour, col.mostsig, cex.pts, lwd.contour, pch,
x.legend, y.legend, cex.legend, bg.legend, ...)
Arguments
y |
a numeric vector or the corresponding column name in the argument |
s2 |
a numeric vector or the corresponding column name in the argument |
n |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the meta-analysis dataset. If |
type |
a character string specifying the type of effect size, which should be one of |
alpha |
a numeric vector specifying the significance levels to be presented in the sample-size-based funnel plot. |
log.ss |
a logical value indicating whether sample sizes are plotted on a logarithmic scale ( |
sigma |
a positive numeric value that is required for the mean difference ( |
p0 |
an optional numeric value specifying a rough estimate of the common event rate in the control group across studies. It is only used for the (log) odds ratio, (log) relative risk, and risk difference. |
xlim |
the x limits |
ylim |
the y limits |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
cols.contour |
a vector of character strings; they indicate colors of the contours to be presented in the sample-size-based funnel plot, and correspond to the significance levels specified in the argument |
col.mostsig |
a character string specifying the color for the most significant result among the studies in the meta-analysis. |
cex.pts |
the size of the points. |
lwd.contour |
the width of the contours. |
pch |
the symbol of the points. |
x.legend |
the x co-ordinate or a keyword, such as |
y.legend |
the y co-ordinate to be used to position the legend (the default is |
cex.legend |
the size of legend text. |
bg.legend |
the background color for the legend box. |
... |
other arguments that can be passed to |
Details
A contour-enhanced sample-size-based funnel plot is generated; it presents study-specific total sample sizes against the corresponding effect size estimates. It is helpful to avoid the confounding effect caused by the intrinsic association between effect size estimates and standard errors in the conventional standard-error-based funnel plot. See details of the derivations of the contours in Lin (2019).
Value
None.
References
Lin L (2019). "Graphical augmentations to sample-size-based funnel plot in meta-analysis." Research Synthesis Methods, 10(3), 376–388. <doi: 10.1002/jrsm.1340>
Peters JL, Sutton AJ, Jones DR, Abrams KR, Rushton L (2006). "Comparison of two methods to detect publication bias in meta-analysis." JAMA, 295(6), 676–680. <doi: 10.1001/jama.295.6.676>
Examples
## mean difference
data("dat.annane")
# descriptive statistics for sigma (continuous outcomes' standard deviation)
quantile(sqrt(dat.annane$s2/(1/dat.annane$n1 + 1/dat.annane$n2)),
probs = c(0, 0.25, 0.5, 0.75, 1))
# based on sigma = 8
ssfunnel(y, s2, n, data = dat.annane, type = "md",
alpha = c(0.1, 0.05, 0.01, 0.001), sigma = 8)
# sample sizes presented on a logarithmic scale with plot title
ssfunnel(y, s2, n, data = dat.annane, type = "md",
alpha = c(0.1, 0.05, 0.01, 0.001), sigma = 8, log.ss = TRUE,
main = "Contour-enhanced sample-size-based funnel plot")
# based on sigma = 17, with specified x and y limits
ssfunnel(y, s2, n, data = dat.annane, type = "md",
xlim = c(-15, 15), ylim = c(30, 500),
alpha = c(0.1, 0.05, 0.01, 0.001), sigma = 17, log.ss = TRUE)
# based on sigma = 20
ssfunnel(y, s2, n, data = dat.annane, type = "md",
xlim = c(-15, 15), ylim = c(30, 500),
alpha = c(0.1, 0.05, 0.01, 0.001), sigma = 20, log.ss = TRUE)
## standardized mean difference
data("dat.barlow")
ssfunnel(y, s2, n, data = dat.barlow, type = "smd",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 1))
## log odds ratio
data("dat.butters")
ssfunnel(y, s2, n, data = dat.butters, type = "lor",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 1.5))
# use different colors for contours
ssfunnel(y, s2, n, data = dat.butters, type = "lor",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 1.5),
cols.contour = c("blue", "green", "yellow", "red"), col.mostsig = "black")
# based on p0 = 0.3 (common event rate in the control group across studies)
ssfunnel(y, s2, n, data = dat.butters, type = "lor",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 1.5), p0 = 0.3)
# based on p0 = 0.5
ssfunnel(y, s2, n, data = dat.butters, type = "lor",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 1.5), p0 = 0.5)
## log relative risk
data("dat.williams")
ssfunnel(y, s2, n, data = dat.williams, type = "lrr",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-1.5, 2.5))
# based on p0 = 0.2
ssfunnel(y, s2, n, data = dat.williams, type = "lrr",
alpha = c(0.1, 0.05, 0.01, 0.001), p0 = 0.2, xlim = c(-1.5, 2.5))
# based on p0 = 0.3
ssfunnel(y, s2, n, data = dat.williams, type = "lrr",
alpha = c(0.1, 0.05, 0.01, 0.001), p0 = 0.3, xlim = c(-1.5, 2.5))
## risk difference
data("dat.kaner")
ssfunnel(y, s2, n, data = dat.kaner, type = "rd",
alpha = c(0.1, 0.05, 0.01, 0.001), xlim = c(-0.5, 0.5))
# based on p0 = 0.1
ssfunnel(y, s2, n, data = dat.kaner, type = "rd",
alpha = c(0.1, 0.05, 0.01, 0.001), p0 = 0.1, xlim = c(-0.5, 0.5))
# based on p0 = 0.4
ssfunnel(y, s2, n, data = dat.kaner, type = "rd",
alpha = c(0.1, 0.05, 0.01, 0.001), p0 = 0.4, xlim = c(-0.5, 0.5))