network_meta.RdFits a network meta-analysis using mars in multilevel or multivariate mode,
where multilevel models always estimate flexible heterogeneity components across
random levels.
network_meta(
data,
study_id,
treatment_1,
treatment_2,
effect,
variance,
reference = NULL,
model_type = c("multilevel", "multivariate"),
heterogeneity = NULL,
tau_components = c("comparison", "treatment"),
nested_levels = NULL,
moderators = NULL,
estimation_method = "REML",
varcov_type = "multilevel",
within_varcov_type = NULL,
sample_size = NULL,
ci_level = 0.95,
robustID = NULL,
optim_method = "L-BFGS-B",
tol = 1e+07,
...
)Data frame with one row per observed contrast.
Study ID column.
First treatment column.
Second treatment column.
Effect-size column interpreted as treatment_2 minus treatment_1.
Sampling-variance column.
Optional reference treatment.
"multilevel" or "multivariate".
For "multilevel", must be "flexible".
For "multivariate", "common" or "flexible".
Flexible multilevel random-component choice.
Optional character vector of additional nested random-effect levels for multilevel models.
Optional moderators to include in both model types. Either
a one-sided formula (e.g., ~ age + risk) or a character vector of column names.
Estimation method passed to mars.
Variance-covariance type passed to mars.
For multivariate models, optional override for within-study
covariance type used by estimation. Defaults to
varcov_type.
Confidence level used for normal-approximation confidence intervals reported for direct, indirect, and total effects. Must be in (0, 1). Default is 0.95.
Optional cluster column name for cluster-robust standard errors (for example, study ID).
Optional sample-size column for multivariate mode.
Optimization method passed to mars.
Optimization tolerance passed to mars.
Additional arguments passed to mars.
An object of class nma_mars with fitted model output, direct/indirect/total
effects (including standard errors and evidence counts), an evidence summary,
incoherence-factor summaries (per-comparison and global), heterogeneity summaries
(including Q for multilevel random levels and tau^2 by component/level), a
contribution matrix (
fixed-effect coefficient summaries with Hessian-to-sandwich SE fallback, moderator
metadata, resolved within-study covariance type, stored within-study covariance blocks
for multivariate fits, cluster-robust settings/output, and treatment ordering.