imed_funnel: Funnel plot for an imedR meta-analysis

View source: R/advanced_validation.R

imed_funnelR Documentation

Funnel plot for an imedR meta-analysis

Description

A funnel plot is diagnostic only and should not be interpreted as a direct test of publication bias, especially with small or heterogeneous evidence.

Usage

imed_funnel(fit, ...)

Arguments

fit

A fitted 'metafor' 'rma' object, for example from 'imed_meta_mean()'.

...

Further arguments passed to 'metafor::funnel()'.

Value

The fitted model 'fit', returned invisibly. The function is called for its side effect of drawing a funnel plot on the active graphics device.

Examples

if (requireNamespace("metafor", quietly = TRUE)) {
  toy <- data.frame(
    Study_ID = paste0("S", 1:12),
    Comparability_Class = "CLASS_A",
    Reported_Unit = "items/L",
    Metric_Type = "Abundance",
    Strict_Synthesis_Eligibility = "YES",
    Group = rep(c("g1", "g2"), 6),
    Mean = c(2.1, 3.4, 1.8, 4.0, 2.9, 3.1, 2.4, 3.8, 1.9, 3.3, 2.7, 4.2),
    SD = rep(c(0.6, 0.9), 6),
    N = rep(c(10, 12, 8), 4)
  )
  fit <- imed_meta_mean(toy)
  imed_funnel(fit)
}

imedR documentation built on Nov. 3, 2026, 5:08 p.m.