
Print and summarize DA, AD, and SWADA fits (bayesmeta-style)
Source:R/construction_reporting.R
construction-summary.RdConsole reports for da(), ad(), and swada() fits, laid out like
print.interactmeta() and summary.interactmeta() for cams(): trials
and modifier levels (with the reference level), method, priors for
Bayesian fits, then a parameter matrix. Frequentist fits show metafor-style rows
(estimate, se, zval, pval, ci.lb, ci.ub). Bayesian fits show
bayesmeta-style rows (mode, median, mean, sd, lower and upper
interval bounds).
Usage
# S3 method for class 'interactmeta_da'
print(x, digits = 2, prob = 0.95, ...)
# S3 method for class 'interactmeta_ad'
print(x, digits = 2, prob = 0.95, ...)
# S3 method for class 'interactmeta_swada'
print(x, digits = 2, prob = 0.95, ...)
# S3 method for class 'interactmeta_da'
summary(object, digits = 2, prob = 0.95, exponentiate = FALSE, ...)
# S3 method for class 'interactmeta_ad'
summary(object, digits = 2, prob = 0.95, exponentiate = FALSE, ...)
# S3 method for class 'interactmeta_swada'
summary(object, digits = 2, prob = 0.95, exponentiate = FALSE, ...)
# S3 method for class 'summary.interactmeta_construction'
print(x, digits = NULL, ...)Arguments
- x
A
da(),ad(), orswada()fit, or (forprint.summary.interactmeta_construction()) asummary.interactmeta_constructionobject.- digits
Decimal places (default
2).- prob
Interval coverage (default
0.95).- ...
Ignored.
- object
- exponentiate
If
TRUE, report the modifier-level and interaction tables ofsummary()on the multiplicative scale. The parameter matrix stays on the fitted scale.
Value
print() methods return x invisibly. summary() returns a
list with classes summary.interactmeta_<analysis> and
summary.interactmeta_construction. It has the same core fields as
summary.interactmeta(): fit, meta, data, parameters,
heterogeneity, subgroups, interaction, digits, prob,
exponentiate, call. It also has estimand, heterogeneity_stats
(metafor fits), weights, priors, and collapsibility (SWADA).
Details
With reference level \(A\) and non-reference level \(B\), the parameter-matrix columns estimate:
DA: \(\gamma_{\mathrm{DA}} = \mu_B - \mu_A\), where \(\mu_A\) and \(\mu_B\) come from separate random-effects meta-analyses of the two modifier series. Columns are
tau[A],tau[B],mu[A],mu[B],gamma(\(\gamma_{\mathrm{DA}}\)). Frequentist \(\mathrm{se}(\gamma_{\mathrm{DA}}) = \sqrt{\mathrm{se}_A^2 + \mathrm{se}_B^2}\). The Bayesian posterior of \(\gamma_{\mathrm{DA}}\) is the convolution of the two independent \(\mu\) posteriors. Itsmodeis not stored and prints asNA.AD: \(\gamma_{\mathrm{AD}}\), the pooled mean of the within-trial contrasts \(g_j = y_{Bj} - y_{Aj}\) (\(\sigma_{gj}^2 = \sigma_{Aj}^2 + \sigma_{Bj}^2\)). Columns are
tau_gamma(heterogeneity of \(g_j\)) andgamma(\(\gamma_{\mathrm{AD}}\)).SWADA: \(\gamma_{\mathrm{SWADA}} = \sum_j w_j g_j = \mu_B - \mu_A\) with one common weight vector \(w_j \propto 1/(\sigma_{gj}^2 + \hat\tau_\gamma^2)\). The modifier-level means are \(\mu_g = \sum_j w_j y_{gj}\), with \(\mathrm{se} = \sqrt{\sum_j w_j^2 \sigma_{gj}^2}\). Columns are
tau_gamma,mu[A],mu[B],gamma_SWADA.
Frequentist zval / pval are two-sided Wald tests
\(z = \hat\theta / \mathrm{se}\). Intervals for \(\tau\) come from
metafor::confint.rma.uni(). Bayesian fits also list their priors.
summary() adds a heterogeneity table and a per-trial data table. For
metafor fits the heterogeneity table also reports \(\tau^2\), Cochran's
\(Q\) with its df and p-value, and \(I^2\). The per-trial table
gives \(y\) and standard errors (and within-trial contrasts \(g_j\)
for AD and SWADA). summary() also shows the
modifier-level effects from modifiers() (DA, SWADA) and the
interaction from interactions(). For SWADA it adds the Prediction
interval and the collapsibility check \(\mu_B - \mu_A = \gamma\).
For DA REML fits, the tau[interaction] row of heterogeneity() comes
from an auxiliary random-effects meta-analysis of \(g_j\). It is not a
DA model parameter.
None of these constructions uses CAMS information fractions.
Examples
# \donttest{
d <- as.data.frame(edss)
fit <- da(d, reference = "Lower", method = "REML")
fit
#> Difference of Averages (DA): 'interactmeta_da' object.
#>
#> 8 trials, 2 subgroups (reference: Lower):
#> ADVANCE, AFFIRM, CONFIRM-B, CONFIRM-C, COP1 PILOT, DEFINE, FREEDOMS, TEMSO
#> Subgroups: Lower, Higher
#>
#> method: REML
#>
#> REML model results:
#> tau[Lower] tau[Higher] mu[Lower] mu[Higher] gamma
#> estimate 0.28 0.27 -0.74 -0.49 0.25
#> se NA NA 0.12 0.14 0.18
#> zval NA NA -6.30 -3.55 1.41
#> pval NA NA 0.00 0.00 0.16
#> ci.lb 0.18 0.00 -0.97 -0.75 -0.10
#> ci.ub 1.25 0.73 -0.51 -0.22 0.61
#>
#> (quoted intervals are Wald confidence intervals; tau intervals from confint.rma();
#> pval: two-sided Wald z-test. se(gamma) = sqrt(se[A]^2 + se[B]^2).)
#> Use summary() for heterogeneity, per-trial data, and modifier-level / interaction effects.
summary(fit)
#> Summary of 'interactmeta_da' object: Difference of Averages (DA).
#>
#> 8 trials, 2 subgroups (reference: Lower):
#> ADVANCE, AFFIRM, CONFIRM-B, CONFIRM-C, COP1 PILOT, DEFINE, FREEDOMS, TEMSO
#> Subgroups: Lower, Higher
#>
#> method: REML
#>
#> REML model results:
#> tau[Lower] tau[Higher] mu[Lower] mu[Higher] gamma
#> estimate 0.28 0.27 -0.74 -0.49 0.25
#> se NA NA 0.12 0.14 0.18
#> zval NA NA -6.30 -3.55 1.41
#> pval NA NA 0.00 0.00 0.16
#> ci.lb 0.18 0.00 -0.97 -0.75 -0.10
#> ci.ub 1.25 0.73 -0.51 -0.22 0.61
#>
#> (quoted intervals are Wald confidence intervals; tau intervals from confint.rma();
#> pval: two-sided Wald z-test. se(gamma) = sqrt(se[A]^2 + se[B]^2).)
#>
#> heterogeneity:
#> parameter estimate 95% CI tau^2 Q df p(Q) I^2
#> tau[Lower] 0.28 (0.18, 1.25) 0.080 31.87 7 <1e-04 78.2%
#> tau[Higher] 0.27 (0.00, 0.73) 0.073 13.82 7 0.055 49.2%
#> tau[interaction] 0.13 (0.00, 0.88) 0.016 9.34 7 0.229 13.7%
#> (tau[interaction]: auxiliary RE-MA of g_j, as in AD; not a DA model parameter.)
#>
#> trial data (trials per level: Lower 8, Higher 8, both 8):
#> trial y[Lower] se[Lower] y[Higher] se[Higher]
#> ADVANCE -0.53 0.14 -0.13 0.31
#> AFFIRM -1.17 0.13 -0.71 0.24
#> CONFIRM-B -0.56 0.16 -0.46 0.29
#> CONFIRM-C -0.37 0.16 -0.19 0.27
#> COP1 PILOT -2.41 0.59 -0.97 0.33
#> DEFINE -0.88 0.15 -0.33 0.31
#> FREEDOMS -0.73 0.12 -1.08 0.27
#> TEMSO -0.51 0.13 -0.09 0.22
#>
#> modifier-level effects:
#> subgroup type estimate se Overall 95% CI
#> Lower Overall -0.74 0.12 (-0.97, -0.51)
#> Higher Overall -0.49 0.14 (-0.75, -0.22)
#>
#> interaction:
#> interaction type estimate se Overall 95% CI
#> Higher - Lower (DA) Overall 0.25 0.18 (-0.10, 0.61)
#>
#> DA and AD are different constructions; DA gamma need not equal AD gamma.
summary(swada(d, reference = "Lower"))
#> Summary of 'interactmeta_swada' object: SWADA principle (same weighting across DA and AD).
#>
#> 8 trials, 2 subgroups (reference: Lower):
#> ADVANCE, AFFIRM, CONFIRM-B, CONFIRM-C, COP1 PILOT, DEFINE, FREEDOMS, TEMSO
#> Subgroups: Lower, Higher
#>
#> method: REML
#>
#> REML model results:
#> tau_gamma mu[Lower] mu[Higher] gamma_SWADA
#> estimate 0.13 -0.74 -0.45 0.29
#> se NA 0.05 0.10 0.12
#> zval NA -13.63 -4.61 2.39
#> pval NA 0.00 0.00 0.02
#> ci.lb 0.00 -0.85 -0.65 0.05
#> ci.ub 0.88 -0.64 -0.26 0.53
#>
#> (quoted intervals are Wald confidence intervals; tau intervals from confint.rma();
#> pval: two-sided Wald z-test.)
#>
#> heterogeneity:
#> parameter estimate 95% CI tau^2 Q df p(Q) I^2
#> tau[interaction] 0.13 (0.00, 0.88) 0.016 9.34 7 0.23 13.7%
#>
#> trial data (trials per level: Lower 8, Higher 8, both 8):
#> trial y[Lower] se[Lower] y[Higher] se[Higher] g se(g)
#> ADVANCE -0.53 0.14 -0.13 0.31 0.40 0.34
#> AFFIRM -1.17 0.13 -0.71 0.24 0.46 0.27
#> CONFIRM-B -0.56 0.16 -0.46 0.29 0.09 0.33
#> CONFIRM-C -0.37 0.16 -0.19 0.27 0.18 0.31
#> COP1 PILOT -2.41 0.59 -0.97 0.33 1.44 0.67
#> DEFINE -0.88 0.15 -0.33 0.31 0.55 0.34
#> FREEDOMS -0.73 0.12 -1.08 0.27 -0.34 0.30
#> TEMSO -0.51 0.13 -0.09 0.22 0.42 0.26
#>
#> modifier-level effects:
#> subgroup type estimate se Overall 95% CI
#> Lower Overall -0.74 0.05 (-0.85, -0.64)
#> Higher Overall -0.45 0.10 (-0.65, -0.26)
#>
#> interaction:
#> interaction estimate se Overall 95% CI Prediction 95% CI
#> Higher - Lower 0.29 0.12 (0.05, 0.53) (-0.04, 0.63)
#>
#> Collapsible: DA interaction == AD interaction (mu[Higher] - mu[Lower] = 0.29; gamma_SWADA = 0.29).
# }