
Joint coherent network meta-analysis
network_meta.RdAll interfaces estimate basic treatment effects jointly under coherence. Standard, multivariate, and multilevel interfaces differ in their random-effect covariance specifications. Sampling covariance is separate from heterogeneity. Incoherence denotes disagreement between evidence sources; transitivity requires substantive assessment of effect modifiers.
Usage
network_meta(
data,
study_id,
treatment_1,
treatment_2,
effect,
variance,
reference = NULL,
model_type = c("coherent", "multivariate", "multilevel", "wls"),
heterogeneity = NULL,
nested_levels = NULL,
moderators = NULL,
estimation_method = "REML",
tau2 = NULL,
control = list(),
ci_level = 0.95,
sampling_covariance = NULL,
observation_id = NULL,
covariance_repair = c("error", "roundoff"),
outcome = NULL,
time = NULL,
treatment_effects = "common",
random_levels = NULL,
inference = "model",
diagnostics = TRUE,
assume_independent = FALSE,
adjust = c("none", "holm", "bonferroni"),
...
)Arguments
- data
Contrast data, one row per observation.
- study_id, treatment_1, treatment_2, effect, variance
Column names for study, treatments, effect (treatment_2 minus treatment_1), and sampling variance.
- reference
Network reference treatment; defaults to first sorted label. It need not occur in every study. Supplied basic-effect covariance must use this reference's coordinates. Printed models and summaries show treatment minus reference contrasts by default. Use
comparisons="all"inprint()orsummary()to display every pair; all contrasts remain in$effects.- model_type
coherent(standard NMA),multivariate(joint basic-effect covariance),multilevel(signed treatment deviations at grouping levels), orwls(zero-heterogeneity GLS).- heterogeneity
One of
none,common, orunstructured.- nested_levels
Ordered grouping columns nested within study. IDs are combined with their parents. Use
random_levelsfor crossed groups instead.- moderators
Numeric column names or a one-sided formula without an intercept; categorical variables are expanded by model.matrix. Covariates interact with basic treatment effects. Effects are reported at covariate zero.
- estimation_method
ML or REML; MLE is accepted as ML.
- tau2
Fixed nonnegative variance(s), or a named basic-effect covariance matrix in the requested reference/stratum coordinates. NULL estimates variance.
- control
List with
maxitandboundary_tolfor optimization diagnostics.- ci_level
Confidence level.
- sampling_covariance
Named full matrix or named study blocks. With NULL, sampling errors are independent. Covariance dimension names are observation IDs.
- observation_id
Column of unique observation IDs. Defaults to row numbers.
- covariance_repair
errororroundoff; the latter clips only tiny negative eigenvalues. Singular matrices are rejected without a supplied independent contrast basis.- outcome, time
Optional columns defining outcome and time strata.
- treatment_effects
One of
common,by_outcome,by_time,by_outcome_time. Each stratum has its own treatment network.- random_levels
Optional grouping columns for additional signed treatment random effects within studies. Crossed groups are allowed. Each group adds one common contrast variance; IDs are interpreted within study.
- inference
modelor study-cluster sandwichCR1. CR1 uses a K/(K-1) adjustment and t reference with K-1 degrees of freedom; it is not CR2.- diagnostics
Compute design-by-treatment Wald incoherence tests with heterogeneity refitted by REML under the augmented model.
- assume_independent
Explicitly assume independent sampling errors for multiple observations within a study when covariance is unavailable. FALSE requires sampling covariance for such studies.
- adjust
Multiplicity adjustment for total treatment-effect p-values:
"none"(default),"holm", or"bonferroni". All unique treatment pairs ineffects, across all reported outcome/time strata, form one family.- ...
Reserved for future arguments; unknown arguments are rejected.
Details
Printing includes network counts, model settings and sampling-only residual Q/I-squared summaries. See network_model_summary for their definitions.
Multiplicity adjustment is performed after fitting using stats::p.adjust().
Each two-sided p-value tests a total network treatment contrast against zero,
using the fitted standard error and the model's normal or CR1 t reference
distribution. Contrasts with moderators are evaluated at covariate zero.
Holm and Bonferroni control family-wise error when the individual tests are
valid; they accommodate dependence among treatment comparisons. The family
includes indirectly estimated pairs and is independent of the network reference.
Its size is the number of rows in effects; nonestimable p-values remain NA
and their hypotheses are retained in the family size.
effects$total_p_value contains raw p-values and
effects$total_p_adjusted contains adjusted p-values. adjustment records
the method, family description and size. Estimates, standard errors and
heterogeneity are unchanged. All existing confidence intervals remain
pointwise at ci_level: Holm or Bonferroni p-value adjustment does not turn
them into simultaneous intervals. Adjusted p-values can therefore disagree
with whether a pointwise interval excludes zero. Adjustment does not cover
moderator-coefficient tests, direct/indirect tests or incoherence diagnostics.
References
Lu, G., and Ades, A. E. (2004). Combination of direct and indirect evidence in mixed treatment comparisons. Statistics in Medicine, 23(20), 3105–3124. doi:10.1002/sim.1875 .
Higgins, J. P. T., Jackson, D., Barrett, J. K., Lu, G., Ades, A. E., and White, I. R. (2012). Consistency and inconsistency in network meta-analysis: concepts and models for multi-arm studies. Research Synthesis Methods, 3, 98–110. doi:10.1002/jrsm.1044 .
White, I. R., Barrett, J. K., Jackson, D., and Higgins, J. P. T. (2012). Consistency and inconsistency in network meta-analysis: model estimation using multivariate meta-regression. Research Synthesis Methods, 3, 111–125. doi:10.1002/jrsm.1045 .
White, I. R. (2015). Network meta-analysis. The Stata Journal, 15(4), 951–985. doi:10.1177/1536867X1501500403 .
Examples
d <- data.frame(study=1:6, a=c("A","A","B","A","A","B"),
b=c("B","C","C","B","C","C"),
effect=c(.2,.5,.3,.3,.6,.2), variance=.04)
network_meta(d,"study","a","b","effect","variance",reference="A")
#> Results generated with MARS: v0.6.0.8
#> Printed on: Friday, November 20, 2026
#>
#> Joint coherent network meta-analysis
#> ====================================
#>
#> Network overview
#> Studies: 6
#> Pairwise comparisons: 6
#> Treatments: 3
#> Designs: 3
#> Unique study treatment pairs: 3
#> Modeled contrast rows: 6
#> Pairwise comparisons count each treatment pair once per study,
#> including implied multi-arm pairs; unique pairs are counted once overall.
#>
#> Model settings
#> Interface: coherent
#> Reference treatment: A
#> Effect direction: Treatment minus A
#> Estimation: REML
#> Sampling covariance: independent
#> Heterogeneity structure: none
#> Inference: model
#> Test reference distribution: Normal (z)
#> Convergence code: 0
#> Covariance boundary: TRUE
#> Treatment p-value adjustment: none
#> Adjustment family size: 3
#>
#> Residual variation (sampling covariance only)
#> Component Q df p-value I2 (%)
#> Overall 0.4166667 4 0.9810898 0.0000000
#> Within designs 0.3750000 3 0.9453571 0.0000000
#> Between designs 0.0416667 1 0.8382565 NA
#> Overall Q/I2 include within-design heterogeneity and between-design incoherence.
#> I2 is Q-based (%); overall and within-design I2 are not additive.
#> These are sampling-only diagnostics, separate from the random-effects Higgins test.
#>
#> Fitted variance components
#> component tau2
#> study 0.0000000
#>
#> Treatment contrasts (treatment minus A; reference comparisons):
#> Raw p-values; confidence intervals: pointwise.
#> contrast total total_se statistic total_ci_lower total_ci_upper
#> B - A 0.2666667 0.1154701 2.3094011 0.0403495 0.4929838
#> C - A 0.5333333 0.1154701 4.6188022 0.3070162 0.7596505
#> total_p_value total_p_adjusted
#> 0.0209213 0.0209213
#> <0.0001 <0.0001