Vignette: An information-geometric tour of meta-analysis -- a worked, executable tour of the package: pooling as a barycenter, heterogeneity, exact inference, diagnostic accuracy with the SROC curve, and the robust Wasserstein-Fisher-Rao pool.
gtmeta is an R package for information-geometric meta-analysis. It represents a study as an estimated Gaussian sampling distribution and pools studies with Bures-Wasserstein, Fisher-Rao, or Wasserstein-Fisher-Rao geometry. The package also contains classical FE, RE, and UWLS benchmarks, simulation helpers, theorem-anchored tests, and adapters for Cochrane-style extracted estimates.
The package is deliberately conservative: geometric estimators are checked against familiar meta-analytic limits where those limits exist. In the scalar fixed-variance case, the Bures-Wasserstein mean reduces to the fixed-effect estimator; the Frechet-variance calibration recovers standard heterogeneity quantities; and the Wasserstein-Fisher-Rao pool gives a robust redescending estimator with a transparent cutoff.
The vignette linked above ships with the package (vignette("igmi-tour")) and is rebuilt as a standalone site with Rscript docs/build.R.
# install.packages("remotes")
remotes::install_github("wmotte/gtmeta")For local development from this directory:
R CMD build .
R CMD check --no-manual gtmeta_0.1.0.tar.gzThe core package depends on base R and metafor. Optional comparators and bridge packages are in Suggests:
mvmeta,mada, andmetamiscfor comparison models and diagnostic-accuracy benchmarks;reticulatefor the optional Python/POT Wasserstein-Fisher-Rao bridge;testthatandwithrfor development tests.
library(gtmeta)
studies <- igmi_studies(
yi = c(0.42, 0.31, 0.55, 0.18, 0.40),
sei = c(0.20, 0.18, 0.25, 0.15, 0.22)
)
fit <- bw_barycenter(studies, weights = igmi_precision_weights(studies))
fit$theta
fit$convergedDiagnostic test accuracy studies can be represented as bivariate Gaussian evidence on the logit sensitivity and logit specificity scale:
dta <- igmi_dta_studies(
tp = c(80, 62), fn = c(20, 18),
fp = c(9, 12), tn = c(91, 88)
)
dta_studies <- lapply(dta, function(s) igmi_gaussian(s$theta, s$Sigma))
bw_barycenter(dta_studies)$theta.
├── DESCRIPTION
├── NAMESPACE
├── R/ # package source
├── man/ # generated Rd documentation
├── tests/testthat/ # theorem-anchored unit tests
├── sim/ # simulation drivers (paper Section 4)
├── emp/ # Cochrane corpus drivers (paper Section 5)
├── validate.R # lightweight live numerical validation script
├── renv.lock # local development dependency lockfile
└── .github/workflows/ # R CMD check workflow
The sim/ and emp/ directories hold the analysis scripts that reproduce the paper; they are excluded from the built package (.Rbuildignore) and their results/ outputs are regenerated by the scripts, not tracked.
Run the unit tests through R CMD check:
R CMD build .
R CMD check --no-manual gtmeta_0.1.0.tar.gzFor a smaller smoke gate that sources the package code directly:
RENV_CONFIG_AUTOLOADER_ENABLED=false Rscript validate.RSome checks that use real external corpora or optional Python optimal-transport tooling skip cleanly when those resources are unavailable.
The simulation and empirical numbers in the manuscript are reproduced by the scripts in sim/ and emp/, which source R/ directly (no installed build needed) and are run from the repository root. Dependencies are pinned in renv.lock.
# Simulation study (Section 4): writes to sim/results/
RENV_CONFIG_AUTOLOADER_ENABLED=false Rscript sim/sim_multivariate.R
RENV_CONFIG_AUTOLOADER_ENABLED=false Rscript sim/sim_contamination.R
# Cochrane corpus (Section 5): writes to emp/results/
RENV_CONFIG_AUTOLOADER_ENABLED=false Rscript emp/emp_univariate.R
RENV_CONFIG_AUTOLOADER_ENABLED=false Rscript emp/emp_multivariate.RThe empirical scripts read the openly available cochrane2025rob corpus; point GTMETA_COCHRANE_DIR at your local copy (default: ../cochrane2025rob_data). See sim/README.md and emp/README.md for the per-script arms, environment overrides, and expected runtimes.
GPL-3. The full license text is in LICENSE.md.
