Skip to contents

mars package logo

mars provides tools for meta-analysis and research synthesis in R, with support for univariate, multivariate, and multilevel meta-analytic models. It also includes helpers for within-study variance-covariance matrices, path analysis after correlation synthesis, publication-bias models, diagnostics, network meta-analysis, reporting, and exploratory random-forest meta-analysis.

Installation

Install the released version from CRAN with:

The package can be installed directly from GitHub using devtools or the remotes package with the following command:

remotes::install_github("lebebr01/mars")

To install the package vignettes, add the build_vignettes argument:

remotes::install_github("lebebr01/mars",
                        build_vignettes = TRUE)

Quick Example

A univariate random-effects meta-analysis can be fit with mars() by supplying an effect-size column, a sampling-variance column, and a study identifier:

library(mars)

fit <- mars(
  data = teacher_expectancy,
  studyID = "study",
  effectID = NULL,
  sample_size = NULL,
  formula = yi ~ 1,
  variance = "vi",
  varcov_type = "univariate",
  structure = "univariate"
)

summary(fit)

Choosing a workflow

Most analyses start with mars(), but the package also includes higher-level helpers for common research-synthesis tasks:

Goal Start with Learn more
Estimate an average effect, meta-regression, or dependent-effects model mars() vignette("MARS-Model-Examples", package = "mars")
Choose among core workflows vignette("Choosing-a-MARS-Workflow", package = "mars") Workflow map
Build within-study variance-covariance matrices mars() with varcov_type vignette("Within-Study-VarCov-Metrics", package = "mars")
Diagnose residuals, influence, or heterogeneity residual_diagnostics(), influence_diagnostics(), profile_random_effects() vignette("Residual-Diagnostics-Workflow", package = "mars")
Assess publication bias or sensitivity publication_bias(), mars_alt_estimation() Publication-bias and alternative-estimation vignettes
Fit treatment networks network_meta() vignette("Network-Meta-Analysis", package = "mars")
Fit path, EFA, or CFA models after correlation synthesis path_model(), efa_from_synthesis(), cfa_from_synthesis() Latent-factor and synthesis-report vignettes
Create review and reporting graphics prisma_diagram(), risk_of_bias_plot(), gap_map_plot() Plot-specific vignettes
Explore nonlinear moderator patterns mars_rf() vignette("Random-Forest-Meta-Analysis", package = "mars")

Explore articles

The installed package includes core vignettes. Additional workflow articles are built for the pkgdown site.

Available installed vignettes can be accessed with the following code:

vignette(package = 'mars')