
Network Meta-analysis with MARS
network_meta.RdFits a network meta-analysis using mars in either multilevel or
multivariate mode and returns direct, indirect, and total treatment effects.
Multilevel models always use flexible heterogeneity across random levels.
Multivariate models can use either common or flexible heterogeneity. The
"wls" model type provides a common-effect weighted least-squares
compatibility estimator for comparisons against graph-theoretical network
meta-analysis implementations.
Usage
network_meta(
data,
study_id,
treatment_1,
treatment_2,
effect,
variance,
reference = NULL,
model_type = c("multilevel", "multivariate", "wls"),
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,
robustID = NULL,
tau2 = NULL,
control = list(),
ci_level = 0.95,
optim_method = "L-BFGS-B",
tol = 1e+07,
...
)Arguments
- data
A data frame with one row per observed treatment contrast.
- study_id
Character string naming the study ID column.
- treatment_1
Character string naming the first treatment column.
- treatment_2
Character string naming the second treatment column.
- effect
Character string naming the effect-size column, interpreted as treatment_2 minus treatment_1.
- variance
Character string naming the sampling-variance column.
- reference
Optional treatment label to use as network reference. If
NULL, the first treatment in sorted order is used.- model_type
One of
"multilevel","multivariate", or"wls".- heterogeneity
For
model_type = "multilevel", must be"flexible". Formodel_type = "multivariate", choose"common"or"flexible".- tau_components
For
model_type = "multilevel", choose"comparison"(default) or"treatment"random components.- nested_levels
Optional character vector of additional column names to append after
study_id/component_idin the multilevel random-effects nesting.- moderators
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
Estimation method passed to
mars.- varcov_type
Variance-covariance type passed to
mars.- within_varcov_type
For
model_type = "multivariate", optional override for within-study covariance estimation used inestimation. Defaults tovarcov_typewhen not provided.- sample_size
Optional sample-size column for multivariate mode.
- robustID
Optional cluster column name for cluster-robust standard errors (for example, study ID) in
model_type = "multivariate".- tau2
Optional user-supplied between-study variance or covariance passed to
mars/estimation. For multilevel network models, supply one value per random-effect component. For multivariate common heterogeneity, supply one value; for flexible diagonal heterogeneity, supply one value per comparison; or supply a positive semidefinite covariance matrix to use an unstructured multivariate heterogeneity covariance.- control
Optional named list of speed diagnostics controls. Supported entries are
use_sparse,reuse_inverses,parallel, andsingular_threshold.- ci_level
Confidence level for normal-approximation confidence intervals returned for direct, indirect, and total effects. Defaults to 0.95.
- optim_method
Optimization method passed to
mars.- tol
Optimization tolerance passed to
mars.- ...
Additional arguments passed to
mars.
Value
A list with class nma_mars containing fitted model output,
direct/indirect/total effects, incoherence-factor summaries,
contribution decomposition summaries, node-splitting summaries, design
inconsistency diagnostics, ranking outputs, and model-fit statistics.
Examples
if (FALSE) { # \dontrun{
nma_dat <- data.frame(
study = c("S1", "S2", "S3", "S4"),
treatment_1 = c("A", "A", "B", "A"),
treatment_2 = c("B", "C", "C", "B"),
effect = c(0.20, 0.35, 0.10, 0.15),
variance = c(0.04, 0.05, 0.04, 0.06)
)
nma_fit <- network_meta(
nma_dat,
study_id = "study",
treatment_1 = "treatment_1",
treatment_2 = "treatment_2",
effect = "effect",
variance = "variance",
model_type = "wls"
)
summary(nma_fit)
} # }