
Estimate a treatment-by-subgroup interaction using the Average-Difference construction
Source:R/constructions.R
ad.RdAverage Difference (AD) first forms the within-trial treatment-by-subgroup difference and then meta-analyzes those differences. For binary subgroups with reference \(A\) and non-reference \(B\), \(g_j = y_{Bj} - y_{Aj}\) with \(\sigma_{gj}^2 = \sigma_{Aj}^2 + \sigma_{Bj}^2\) (within-trial subgroup covariance assumed zero), and \(\gamma_{\mathrm{AD}}\) is a random-effects meta-analysis of the \(g_j\).
Usage
ad(
data,
reference,
modifier = NULL,
trial = "study",
subgroup = "level",
yi = "yi",
vi = "vi",
method = "Bayesian",
tau.prior = NULL,
mu.prior = NULL,
...
)Arguments
- data
A data frame with
trial,subgroup,yi, andvi.- reference
Reference subgroup label.
- modifier
Column of the two levels. Overrides
subgroupwhen set. The default column remains"subgroup".- trial, subgroup, yi, vi
Column names.
- method
Inferential method.
NULL(default) is"REML"for metafor and"bayes"for bayesmeta. metafor also accepts"ML". Ifengineis omitted,"bayes"uses bayesmeta and"REML"/"ML"use metafor.- tau.prior, mu.prior
Bayesian priors when
engine = "bayesmeta"(defaults: improper uniform on \(\tau\), matching bayesmeta; \(N(0,10)\) on \(\mu\). AD uses the same tau default as CAMS interaction). Ignored by metafor.- ...
Computational options passed to
metafor::rma()orbayesmeta::bayesmeta()(includingengine_args).
Details
AD is a different construction from da() (Panaro, Röver & Friede
2026), not an inference framework. It may be fitted with
engine = "metafor" (REML/ML) or engine = "bayesmeta" (Bayesian RE-MA
of \(g_j\)). The CAMS manuscript’s BIM (Bayesian interaction
meta-analysis) is the Bayesian analogue of this construction. A Bayesian
AD fit is internally complete: it does not borrow uncertainty or
heterogeneity from Bayesian DA or CAMS. It still does not use CAMS
information fractions.
Study weights are those of the interaction series,
\(w_j \propto 1/(\sigma_{gj}^2 + \tau_g^2)\). They generally differ from
the subgroup-specific weights used by da(). swada() replaces those
analysis-specific weights with one common vector. cams() is a
different object: the CAMS statistical model.
References
Panaro RV, Röver C, Friede T (2026). Subgroup comparisons within and across studies in meta-analysis. Research Synthesis Methods (in press). arXiv:2508.15531. https://doi.org/10.48550/arXiv.2508.15531
Fisher DJ, Carpenter JR, Morris TP, Freeman SC, Tierney JF (2017). Meta-analytical methods to identify who benefits most from treatments: daft, deluded, or deft approach? BMJ, 356, j573. https://doi.org/10.1136/bmj.j573
Panaro RV, Röver C, Friede T (2025). Consistent Bayesian meta-analysis on subgroup specific effects and interactions. arXiv:2512.18785. https://doi.org/10.48550/arXiv.2512.18785