
Funnel Plot for Publication-Bias Models
funnel_plot.RdDraws a funnel directly from an ordinary mars fit, a pub_bias fit, or a
precomputed trim_fill() result. Selection fitting is not required.
Usage
funnel_plot(object, ...)
# S3 method for class 'pub_bias'
funnel_plot(
object,
y_axis = c("se", "precision"),
center = c("adjusted", "observed", "none"),
show_contours = TRUE,
contour_levels = c(0.9, 0.95),
point_cex = 0.9,
point_col = "#1F4E79",
xlab = "Effect size",
ylab = NULL,
main = "Funnel Plot",
center_line_col = "gray40",
contour_col = "gray65",
main_adj = 0.5,
main_line = NULL,
trim_fill = FALSE,
trim_fill_args = list(),
filled_pch = 21,
filled_col = "#C0392B",
show_legend = TRUE,
...
)
# S3 method for class 'mars'
funnel_plot(object, ...)
# S3 method for class 'mars_trimfill'
funnel_plot(object, trim_fill = TRUE, trim_fill_args = list(), ...)Arguments
- object
Ordinary mars fit, pub_bias fit or mars_trimfill result. Network fits use
network_funnel_plot().- ...
Named graphics arguments passed to
graphics::plot(), overriding plotting defaults where supplied; axes limits can include imputed points.- y_axis
One of
"se"(standard error, default) or"precision".- center
adjusted uses the ordinary fitted intercept/reference prediction for mars, the selection-adjusted reference for pub_bias, or the augmented estimate when trim_fill=TRUE. References use predictor zero, and an intercept- free model gives zero. observed uses only observed studies' marginal inverse- sampling-variance mean; none omits the line. These are not row-specific moderator predictions or dependence-adjusted pooled means.
- show_contours
Logical; if
TRUE, adds pseudo confidence contours.- contour_levels
Numeric vector of contour levels (e.g.,
c(0.90, 0.95)).- point_cex
Point size scaling.
- point_col
Point color.
- xlab
Label for x-axis.
- ylab
Optional y-axis label. If
NULL, chosen fromy_axis.- main
Plot title.
- center_line_col
Center-line color.
- contour_col
Contour-line color.
- main_adj
Horizontal title alignment in
[0, 1].- main_line
Optional title line. If
NULL, default is used.- trim_fill
Logical; TRUE computes
trim_fill()on the ordinary parent and plots observed plus hypothetical studies. It does not combine trim-and-fill with selection-adjusted effects. A precomputed mars_trimfill result always plots its augmented data; use its parent to omit or change the adjustment.- trim_fill_args
Named controls passed to
trim_fill(), excluding object. Requires trim_fill=TRUE and cannot modify a precomputed result.- filled_pch, filled_col
Symbol and border color for hypothetical studies; observed studies use solid circles in point_col. Default filled points are open.
- show_legend
Logical; add observed/imputed symbol labels with trim-and-fill.
Value
Invisibly returns plotted effect, se, fitted and imputed columns, plus source-row/study metadata with trim-and-fill. The trim_fill attribute stores its full sensitivity result (NULL for ordinary plots); center stores the actual guide center, including NA when omitted.
Details
Pseudo contours are center plus/minus qnorm((1+level)/2)*sampling SE.
They are descriptive sampling guides, omit heterogeneity and uncertainty in
the center, and are not simultaneous intervals or null-significance contours.
Raw effects with moderators or multiple outcomes can have different expected
means; interpret their combined funnel cautiously or plot suitable strata.
SE axes decrease upwards; precision axes increase upwards. Trim-and-fill is
restricted to independent, intercept-only univariate models and preserves the
parent's ML/REML or fixed heterogeneity convention. Filled effects reflect
selected observed effects around a trimmed symmetry center and retain their
variances. Filling is a sensitivity analysis, not recovery of missing studies.
Without trimming, ordinary multilevel/multivariate raw funnels remain descriptive
and do not display study-cluster-adjusted sampling uncertainty. See trim_fill()
and egger_test() for assumptions, limitations and the independent test.
Examples
# \donttest{
fit <- mars(
data = teacher_expectancy,
studyID = "study",
effectID = NULL,
sample_size = NULL,
formula = yi ~ 1,
variance = "vi",
varcov_type = "univariate",
structure = "univariate"
)
funnel_plot(fit)
egger_test(fit)
#> Egger-type small-study-effects test
#> Egger-type small-study-effects regression with study-cluster robust SE (CR1S, naive-t)
#> asymmetry SE statistic df p_value
#> 1.624 0.786 2.067 18 0.05347
#> Independent clusters: 19 | Effects: 19
#> Asymmetry does not establish publication bias.
funnel_plot(fit,trim_fill=TRUE,trim_fill_args=list(side="left"))
bias_fit <- publication_bias(fit)
funnel_plot(bias_fit)
# }