CausalMetaR: An R package for performing causally interpretable meta-analyses

Guanbo Wang, Sean McGrath, Lian Yi

TL;DR

CausalMetaR is a new R package that bridges the gap between traditional meta-analysis and causal inference. It allows researchers to leverage multi-source data (like trials and observational cohorts) to estimate treatment effects that are actually interpretable for a specific, well-defined target population, using robust machine learning-based estimators.

What Problem Does This Paper Address?

Standard meta-analysis usually involves taking a weighted average of results from different studies. While useful, this approach has a major flaw: the studies often represent different underlying populations. Consequently, the "pooled estimate" doesn't actually apply to any specific group of people—it’s a statistical average of a "mush" of populations.

In clinical practice, we want to know: "What is the effect of this treatment for my specific target population?" This requires causal transportability—the ability to take findings from various sources and map them onto a target group (either one of the study sources or an entirely external population). Until now, implementing the complex math required for this (like doubly robust estimation and cross-fitting) was a significant barrier for most researchers.

Methods

The package implements a suite of "state-of-the-science" statistical techniques:

  • Targeted Estimands: It estimates both Average Treatment Effects (ATEs) and Subgroup Treatment Effects (STEs) for "internal" populations (one of the data sources) or "external" populations (where you only have covariate data).
  • Influence Function-Based Estimators: These are "doubly robust," meaning the estimate remains consistent even if some of the underlying statistical models (nuisance functions) are slightly off.
  • SuperLearner Integration: Instead of forcing users to pick one model (like a linear regression), the package uses the SuperLearner framework to ensemble multiple machine learning algorithms (Random Forests, Neural Nets, Lasso, etc.) to estimate the relationship between variables.
  • Cross-Fitting: To prevent "overfitting" when using flexible machine learning models, the package automatically handles stratified sample splitting and cross-fitting, ensuring that the resulting confidence intervals are statistically valid.

Datasets

The paper demonstrates the package using a simulated multi-source dataset included in the package:

  • dat_multisource: A dataset containing 4,051 individuals across three different sources (A, B, and C) with a continuous outcome, binary treatment, and nine covariates.
  • dat_external: A separate dataset of 10,083 individuals representing an external target population where only baseline characteristics (covariates) are known.

Key Insights and Ideas

  • Causal Interpretability is Key: The authors argue that a meta-analysis isn't just about "more data"; it's about defining a clear target population so the results can actually guide clinical decisions.
  • Handling "Nuisance": The package automates the estimation of four complex "nuisance functions"—the outcome model, the source model (who belongs to which study), the external model, and the propensity score (probability of treatment).
  • Simultaneous Confidence Bands (SCBs): When looking at multiple subgroups (STEs), the package provides SCBs to account for multiple comparisons, preventing researchers from "cherry-picking" significant results by chance.
  • Flexibility: It allows for the combination of randomized trials and observational data, which is increasingly important in the era of "Real World Evidence."

Key Results

The paper provides a walkthrough showing how CausalMetaR produces clear, actionable outputs:

  • External ATE: In the example, the package estimated a treatment effect of 6.63 (95% CI: 5.94, 7.32) for the external population.
  • Internal ATEs: It successfully identified that the treatment effect varied across the three source populations (ranging from 6.59 to 7.76), highlighting why simple pooling would be misleading.
  • Forest Plots: The package includes built-in visualization tools to generate forest plots of subgroup effects, making it easy to see how treatment efficacy changes across different patient characteristics.

Limitations and Future Work

  • Categorical Modifiers Only: Currently, the package requires effect modifiers (the variables defining subgroups) to be categorical. The authors plan to add support for continuous modifiers in future versions.
  • Quantile Effects: The current version focuses on mean differences; future updates aim to include quantile treatment effects (e.g., how the treatment affects the 25th vs. 75th percentile of the population).
  • Sample Size: The authors note that the cross-fitting procedure requires a decent amount of data; for very small, early-phase trials, these robust methods might not be feasible.

Summary updated

Abstract

Researchers would often like to leverage data from a collection of sources (e.g., primary studies in a meta-analysis) to estimate causal effects in a target population of interest. However, traditional meta-analytic methods do not produce causally interpretable estimates for a well-defined target population. In this paper, we present the CausalMetaR R package, which implements efficient and robust methods to estimate causal effects in a given internal or external target population using multi-source data. The package includes estimators of average and subgroup treatment effects for the entire target population. To produce efficient and robust estimates of causal effects, the package implements doubly robust and non-parametric efficient estimators and supports using flexible data-adaptive (e.g., machine learning techniques) methods and cross-fitting techniques to estimate the nuisance models (e.g., the treatment model, the outcome model). We describe the key features of the package and demonstrate how to use the package through an example.
BibTeX
@inproceedings{wang2025causalmetar,
  author = {Guanbo Wang and Sean McGrath and Lian Yi},
  title = {{CausalMetaR: An R package for performing causally interpretable meta-analyses}},
  booktitle = {Research},
  year = {2025},
  doi = {10.1017/rsm.2025.5},
}
Figure