MAGMA.R: MAny-Group MAtching

Balancing quasi-experimental field research for effects of covariates is fundamental for drawing causal inference. (Propensity Score) Matching deals with this issue but current techniques are restricted to binary treatment variables. Moreover, they provide several solutions without providing a comprehensive framework on choosing the best model. The MAGMA R-package addresses these restrictions by offering nearest neighbor matching based on Propensity Scores or the Mahalanobis Distance for two to four groups. It also includes the option to match data of a 2x2 design. In addition, MAGMA includes a framework for evaluating the post-matching balance. The package includes functions for the matching process and matching reporting. We provide a General tutorial on MAGMA and a tutorial for Mahalanobis Distance Matching as vignettes. More information on MAGMA can be found in Feuchter, M. D., Urban, J., Scherrer V., Breit, M. L., and Preckel F. (2022) <https://osf.io/p47nc/>.

Version: 1.1
Depends: R (≥ 4.2.0), tidyverse (≥ 2.0.0)
Imports: parallel (≥ 4.2), doParallel (≥ 1.0.17), foreach (≥ 1.5.2), metafor (≥ 4.4-0), robumeta (≥ 2.1), psych (≥ 2.3.9), ggplot2 (≥ 3.4.4), janitor (≥ 2.2.0), flextable (≥ 0.9.4) , overlapping (≥ 2.1), purrr (≥ 1.0.1), tibble (≥ 3.2.1), dplyr (≥ 1.1.4), tidyselect (≥ 1.2.0), stats (≥ 4.2), rlang (≥ 1.1.1), stddiff (≥ 3.1)
Suggests: knitr, rmarkdown
Published: 2026-07-28
DOI: 10.32614/CRAN.package.MAGMA.R
Author: Julian Urban [aut, cre], Markus D. Feuchter [aut], Vsevolod Scherrer [aut], Moritz L. Breit [aut], Franzis Preckel [aut]
Maintainer: Julian Urban <julian.urban at uni-potsdam.de>
BugReports: https://github.com/JulianUrban/MAGMA/issues
License: GPL-3
NeedsCompilation: no
CRAN checks: MAGMA.R results

Documentation:

Reference manual: MAGMA.R.html , MAGMA.R.pdf
Vignettes: A Tutorial for Mahalanobis distance matching with MAGMA.R (source, R code)
Turn up the Heat! A Tutorial for the MAGMA R-package. (source, R code)

Downloads:

Package source: MAGMA.R_1.1.tar.gz
Windows binaries: r-devel: MAGMA.R_1.0.4.zip, r-release: MAGMA.R_1.0.4.zip, r-oldrel: MAGMA.R_1.0.4.zip
macOS binaries: r-release (arm64): MAGMA.R_1.1.tgz, r-oldrel (arm64): MAGMA.R_1.0.4.tgz, r-release (x86_64): MAGMA.R_1.0.4.tgz, r-oldrel (x86_64): MAGMA.R_1.0.4.tgz
Old sources: MAGMA.R archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=MAGMA.R to link to this page.