Learn R Programming

baggr (version 0.8)

funnel_plot: 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
)

Value

A ggplot funnel plot for the supplied model

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.

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.

Examples

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

Run the code above in your browser using DataLab