Skip to contents

Core contribution-adjusted display: population subgroup curves \(\mu_A(\pi)\) / \(\mu_B(\pi)\) with pointwise credible ribbons from predict_cams_by_if(), the overall CAMS line \(M(\pi)=\alpha+\theta\pi\), and observed study effects at each trial's own \(\pi_j\). This is the plot of the CAMS identities \(\mu_B(\pi)-\mu_A(\pi)=\gamma\) and \(M(\pi)=(1-\pi)\mu_A(\pi)+\pi\mu_B(\pi)\).

Usage

plot_contribution(
  fit,
  ifrac_var = NULL,
  prob = 0.95,
  type = "Overall",
  max_support = NULL,
  contrast_sep = "-",
  exponentiate = FALSE,
  subgroup_var = NULL,
  at_ifrac = NULL,
  oi_support = NULL,
  trial_var = NULL,
  effects = NULL,
  re_formula = NA,
  resolution = 200,
  subgroup_labels = NULL,
  legend_math = NULL,
  colors = NULL,
  fills = NULL,
  xlab = NULL,
  ylab = "Treatment effect",
  xlim = NULL,
  ylim = NULL,
  x_breaks = NULL,
  y_breaks = NULL,
  show_overall_line = TRUE,
  ribbon_interval.type = "central",
  point_size_range = c(2.5, 6.5),
  show_footnote = TRUE,
  digits = 2,
  base_size = interactmeta_base_size(default = 11L),
  ...
)

Arguments

fit

A interactmeta / interactmeta from cams().

ifrac_var, prob, type, max_support, contrast_sep

Passed to predict_cams_by_if() and ifrac().

exponentiate

If TRUE, draw the CAMS curves, study points, and intervals on the exponential (ratio) scale. Observed yi are exponentiated after the log-scale Wald interval is formed.

subgroup_var, trial_var

Optional subgroup and trial column names. Defaults to the names stored on fit.

at_ifrac

Optional dotted reference IF; default NULL (no marker).

oi_support

Optional overall-IF draws (see ifrac()).

effects, re_formula, resolution

Passed to the conditional-effects helper (re_formula = NA by default, population effects only).

subgroup_labels, legend_math, colors, fills, ylab

Plot styling.

xlab

Axis label; default "Information fraction (IF) (%)".

xlim, ylim, x_breaks, y_breaks

Axis limits and breaks (xlim / x_breaks are on the percent scale, 0–100).

show_overall_line

Logical; dashed \(M(\pi)=\alpha+\theta\pi\) line (legend “All” when drawn).

ribbon_interval.type

"central" or "shortest" credible interval for subgroup ribbon limits on the DIRECT mixture (default "central").

point_size_range

Range for precision-scaled study points.

show_footnote

If TRUE (default), add a caption below the plot with the reporting information fraction (percent, interval), and study count. Use FALSE to omit it.

digits

Decimal places in the footnote.

base_size

Base ggplot2 theme size.

...

Ignored.

Value

A ggplot2 object, invisibly.

Examples

if (FALSE) { # \dontrun{
plot(fit)
} # }