Skip to contents

Trial-specific subgroup effects reconstructed at each trial's own information fraction \(\pi_j\) (the same estimand as the observed black squares on forestplot()). Two latent components are shrunk and then inverted: $$\widetilde\mu_{Aj}=\widetilde m_j-\pi_j\widetilde g_j,\qquad \widetilde\mu_{Bj}=\widetilde m_j+(1-\pi_j)\widetilde g_j.$$ with $$g_j=\widetilde\mu_{Bj}-\widetilde\mu_{Aj},\qquad m_j=(1-\pi_j)\widetilde\mu_{Aj}+\pi_j\widetilde\mu_{Bj}.$$ These identities hold draw by draw on the model scale; exponentiation (if requested) happens only afterwards. A grey forest marker therefore need not lie between the quoted estimate and the subgroup pooled diamond.

Usage

shrinkage(
  fit,
  type = c("modifiers", "interaction", "combined", "subgroups"),
  format = c("list", "summary"),
  prob = 0.95,
  max_support = NULL,
  summary = TRUE,
  contrast_sep = "-",
  ifrac = c("interaction", "overall"),
  at = NULL,
  exponentiate = FALSE,
  component = NULL,
  contribution
)

Arguments

fit

A interactmeta from cams().

type

Which estimand (same labels as forestplot()):

  • "modifiers" (default; "subgroup" / deprecated "subgroups" accepted): \(\mu_{A,j}, \mu_{B,j}\)

  • "interaction": \(g_j\)

  • "combined": \(m_j\)

format

Output representation:

  • "list" (default): S3 object with long $support, optional $summary, and $components (observed / shrunk matrices)

  • "summary": summary data frame only

prob

Coverage probability for intervals when a summary is built.

max_support

Optional cap on unweighted posterior rows. Rejected for Bayesian CAMS DIRECT supports; omit it.

summary

If TRUE (default), attach / build a summary when format = "list" or "summary".

contrast_sep

Passed to contrast resolution (default "-").

ifrac

How overall IF \(\omega\) is pooled via ifrac() when at is NULL (metadata / annotations only for shrinkage; draws themselves use \(\pi_j\)): "interaction" (default) or "overall".

at

Optional reporting information fraction (same as modifiers()).

exponentiate

If TRUE, transform posterior draws with exp() after the linear-scale reconstruction (for reporting only).

component

Soft-deprecated alias for type.

contribution

Deprecated; use \code{at}.

Value

Depends on format. For format = "list", see $components and shrinkage_components().

Details

Engine-native trial effects:

  • bayesmeta: DIRECT individual posteriors (bmr$shrink.moments / bayesmeta$cond.moment(individual=)), the same quantities stored in fit$latent$mu_A / $mu_B.

  • metafor: empirical-Bayes BLUPs of the orthogonal overall and interaction blocks, then the same reconstruction.

This is not the fixed-effect linear predictor at \(\pi_j\). fitted() returns that FE mean (fit$mu); shrinkage() is the trial-level reconstruction the forest greys use. Overall / Prediction use overall IF \(\omega\); see subgroups() and standardized_trial_effects().