
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.
Install the released version from CRAN with:
install.packages("mars")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)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)## Results generated with MARS:v 0.5.2
## Thursday, September 24, 2026
##
## Model Type:
## univariate
##
## Estimation Method:
## Restricted Maximum Likelihood
##
## Model Formula:
## yi ~ 1
##
## Data Summary:
## Number of Effect Sizes: 19
## Number of Fixed Effects: 1
## Number of Random Effects: 1
##
## Random Components:
## term var SD
## intercept 0.01882 0.1372
##
## Fixed Effects Estimates:
## attribute estimate SE z_test p_value lower
## (Intercept) 0.0837 0.05164 1.621 0.1051 -0.01751
## upper
## 0.1849
##
## Model Fit Statistics:
## logLik Dev AIC BIC AICc
## -3.736 7.472 11.47 13.25 16.09
##
## Q Error: 35.83 (18), p = 0.0074
##
## I2 (General): 43.24383
##
## Residual Diagnostics:
## n n_finite_raw mean_raw sd_raw rmse mae q_pearson
## 19 19 0.07998 0.3589 0.3583 0.2491 25.6
## mean_abs_studentized max_abs_studentized
## 0.9379 2.782
## prop_abs_studentized_gt2 prop_abs_studentized_gt3
## 0.1053 0
##
## Normality (whitened residuals): test n_tested statistic p_value
## shapiro_wilk_whitened 19 0.9381 0.2432
##
## Heteroscedasticity trend (|raw residual| ~ fitted): n corr_abs_raw_fitted slope p_value
## 19 NA NA NA
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() |
Installed vignette:
vignette("MARS-Model-Examples", package = "mars") |
| Reproduce the Becker, Aloe, and Cheung correlation-synthesis example | mars(), df_to_corr(),
path_model() |
Installed vignette:
vignette("Becker-Aloe-Cheung-2019", package = "mars") |
| Fix heterogeneity values for sensitivity analyses | mars(tau2 = ...) |
pkgdown article: User-specified heterogeneity |
| Choose among core workflows | mars() |
pkgdown article: Choosing a MARS workflow |
| Build within-study variance-covariance matrices | mars() with varcov_type |
pkgdown article: Within-study variance-covariance metrics |
| Diagnose residuals, influence, or heterogeneity | residual_diagnostics(),
influence_diagnostics(),
profile_random_effects() |
pkgdown article: Residual and influence diagnostics |
| Assess publication bias or sensitivity | publication_bias(),
mars_alt_estimation() |
pkgdown articles for publication bias and alternative estimation |
| Fit joint coherent treatment networks | network_meta() (coherent,
multivariate, multilevel) |
pkgdown article: Network meta-analysis |
| Fit path, EFA, or CFA models after correlation synthesis | path_model(), efa_from_synthesis(),
cfa_from_synthesis() |
pkgdown articles for latent-factor and synthesis-report workflows |
| Create review and reporting graphics | prisma_diagram(), risk_of_bias_plot(),
gap_map_plot() |
pkgdown articles for review graphics |
| Explore nonlinear moderator patterns | mars_rf() |
pkgdown article: Random-forest meta-analysis |
The CRAN package installs a small set of core vignettes. Additional workflow articles are built for the pkgdown site at https://mars.brandonlebeau.org/.
Available installed vignettes can be accessed with the following code:
vignette(package = 'mars')This package was extended from the original metaRmat
which was developed for the synthesis of correlation matrices. We thank
Betsy J. Becker for providing support and guidance on the implementation
in metaRmat. We also thank Roberto Toro-Rodriguez and
Seohee Park for helping develop the jacobian function for correlation
matrices and the optimization of the chi-square goodness of fit
statistics. Final thank you to Junyoung Jung for testing the LASSO
functions within the newer mars package.
masmr(..., missing="em") completes continuous source
predictors once for the methodology-only and joint models, using the
shared MARS EM preparation helper. Diagnostics and original/completed
predictor values are retained in missing_data$em.
Interactions are reconstructed from completed source values; sensitivity
refits do not rerun EM. Standard errors condition on the single
completion and exclude imputation uncertainty. See ?masmr
and the Moderator-Missing-Data-EM and MASMR-Workflow vignettes for
executable examples, limitations, and interpretation.
Multiple-imputation pooling remains separate.