funnel_plot: Funnel plots for baggr models

View source: R/funnel.R

funnel_plotR Documentation

Funnel plots for baggr models

Description

Funnel plots for baggr models

Usage

funnel_plot(
  bg,
  show = c("inputs", "posterior"),
  level = 0.95,
  label = FALSE,
  covariate = NULL
)

funnel(...)

Arguments

bg

a baggr() model

show

whether to plot raw study-level inputs ("inputs") or posterior summaries ("posterior")

level

confidence level for reference lines

label

logical: add study/group labels?

covariate

optional name of a column in the model input data used to colour points.

...

arguments passed to funnel_plot()

Details

Funnel plots provide a visual check of how study-level effects vary with precision. Apparent asymmetry can indicate small-study effects, but can also arise due to unexplained heterogeneity between studies.

For models with group-level covariates, colouring points by a covariate can help inspect whether asymmetry is partly explained by meta-regression effects. In Rubin summary-data meta-regression models (model = "rubin" with covariates), show = "posterior" plots posterior study effects from group_effects(), which include the fitted covariate contribution. By contrast, show = "inputs" plots the original study-level estimates.

Value

A ggplot funnel plot for the supplied model

Examples

bg <- baggr(schools, iter = 500, refresh = 0)
funnel_plot(bg, label = TRUE)


baggr documentation built on June 16, 2026, 9:06 a.m.