Creates a funnel plot with power regions and computes power-related statistics.
viz_sunset(
x,
y_axis = "se",
true_effect = NULL,
method = "FE",
sig_level = 0.05,
power_stats = TRUE,
power_contours = "discrete",
contours = FALSE,
sig_contours = TRUE,
text_size = 3,
point_size = 2,
xlab = "Effect",
ylab = NULL,
x_trans_function = NULL,
x_breaks = NULL,
y_breaks = NULL,
x_limit = NULL,
y_limit = NULL
)
data.frame or matrix with the effect sizes of all studies (e.g.,
log odds ratios, or Cohen d) in the first column and their
respective standard errors in the second column. Alternatively, x can be the
output object of function rma.uni
from package
metafor; then effect sizes and standard errors are extracted from x
.
character string indicating which y axis should be used in the funnel plot. Available options are "se" (default) for standard error and "precision" for the reciprocal of the standard error.
numeric scalar. Which true effect should be assumed for power calculations? The default is NULL
,
for which the meta-analytic summary effect is used (computed with method
).
character string indicating the method used to compute the meta-analytic summary effect. Can be any method argument from rma.uni
(e.g., "FE" for the fixed effect model (default), or "DL" for the random effects model using the DerSimonian-Laird method to estimate \(\tau^2\)).
If input x
is an output object of function rma.uni
from package metafor, then the method is extracted from x
.
logical scalar. For which significance level alpha should the study power be computed?
logical scalar. Should power-related statistics be computed and printed in the caption of the plot? (see details)
character string specifying how different power regions are plotted. Can be either "continuous" or "discrete" (default).
logical scalar indicating if classic funnel plot confidence contours and the summary effect should be displayed.
logical scalar. Should significance contours be drawn (at the 0.05 or 0.01 level using a two-sided Wald test)?
numeric value. Size of text in the funnel plot. Default is 3.
numeric value. Size of the study points in the funnel plot. Default is 2.
character string specifying the label of the x axis.
character string specifying the label of the y axis.
function to transform the labels of the x axis. Common uses are to transform
log-odds-ratios or log-risk-ratios with exp
to their original scale (odds ratios and risk ratios), or Fisher's z values
back to correlation coefficients using tanh
.
numeric vector of values for the breaks on the x-axis. When used in tandem with x_trans_function
the supplied values should be not yet transformed.
numeric vector of values for the breaks on the y-axis.
numeric vector of length two with user specified x axis limits.
numeric vector of length two with user specified y axis limits.
A power enhanced ("sunset") funnel plot is created using ggplot2.
The funnel plot is the most widely used diagnostic plot in meta-analysis, primarily to assess small-study effects. The sunset (power-enhanced) funnel plot incorporates study-level power information in the funnel display. This directly allows to examine the power studies had to detect an effect of interest (e.g., the observed meta-analytic summary effect), whether funnel plot asymmetry is driven by underpowered but significant studies, and to visually assess if there is an excess of low-powered significant effects in the meta-analysis (conceptually related to the test of excess significance, Ioannidis & Trikalinos, 2007). For effect sizes assumed to be normally distributed (e.g., Cohen d, log OR), the power corresponding to a given standard error is computed by using a two-sided Wald test and (by default) the meta-analytic summary effect as assumed true effect. Colored regions of different power levels and a second axis with study level power are shown in the funnel plot. In addition, power-related statistics are shown: a) The median power of all studies, b) the true effect size necessary such that the median power of the studies would have been 33% or 66%, c) results of a test of excess significance (Ioannidis & Trikalinos, 2007), and d) the R-Index for expected replicability (Schimmack, 2016).
Ioannidis, J. P., & Trikalinos, T. A. (2007). An exploratory test for an excess of significant findings. Clinical Trials, 4, 245-253.
Schimmack, U. (2016). The replicability-index: Quantifying statistical research integrity. Retrieved from https://replicationindex.wordpress.com/2016/01/31/a-revised-introduction-to-the-r-index/
# NOT RUN {
library(metaviz)
# Create a power-enhanced ("sunset") funnel plot using confidence and significance contours
viz_sunset(x = homeopath[, c("d", "se")], contours = TRUE)
# }
Run the code above in your browser using DataLab