Skip to content
/ mlumr Public

An R package for conducting multilevel unanchored meta-regression (ML-UMR)

License

Notifications You must be signed in to change notification settings

choxos/mlumr

Repository files navigation

mlumr: Multilevel Unanchored Meta-Regression mlumr logo

Project Status: Active Version R-CMD-check test-coverage pkgdown Codecov test coverage License: MIT ORCiD

The mlumr package implements Multilevel Unanchored Meta-Regression (ML-UMR) for population-adjusted indirect comparisons in disconnected networks. This method extends the ML-NMR framework (Phillippo et al. 2020) to handle situations where individual patient data (IPD) is available for one treatment and only aggregate data (AgD) is available for the comparator, with no common comparator linking the two studies. Models are estimated in a Bayesian framework using Stan via cmdstanr.

Key Features

  • Multiple outcome types: Binary (binomial), continuous (normal), and count (Poisson) outcomes
  • Population adjustment: Account for differences in prognostic factors between study populations using quasi-Monte Carlo integration with Gaussian copula
  • Shared Prognostic Factor Assumption (SPFA): Fit models with shared or treatment-specific regression coefficients to test for effect modification
  • Multiple estimands: Marginal treatment effects in index, comparator, or external target populations
  • Model comparison: DIC-based model comparison and comprehensive diagnostics
  • Simulation: Built-in data generation for testing and validation

Installation

Prerequisites

Install cmdstanr and CmdStan:

install.packages("cmdstanr", repos = c("https://stan-dev.r-universe.dev", getOption("repos")))
cmdstanr::install_cmdstan()

Install mlumr

# install.packages("remotes")
remotes::install_github("choxos/mlumr")

Getting Started

A good place to start is with the package vignettes which walk through example analyses:

Full function documentation is available at https://choxos.github.io/mlumr/reference/.

The methodology is described in:

Chandler, C. & Ishak, J. (2025). "Anchors Away: Navigating Unanchored Indirect Comparisons With Multilevel Unanchored Meta-Regression (ML-UMR)." ISPOR Europe 2025.

Phillippo, D. M. et al. (2020). "Multilevel Network Meta-Regression for population-adjusted treatment comparisons." Journal of the Royal Statistical Society: Series A, 183(3):1189-1210. doi: 10.1111/rssa.12579.

Quick Start

library(mlumr)

# Generate example data (binary outcome)
data <- generate_simulation_data(
  n_index = 200,
  n_comparator = 150,
  n_covariates = 2,
  effect_modification = "none"
)

# Set up unanchored comparison
ipd <- set_ipd_unanchored(
  data = data$ipd,
  treatment = "treatment",
  outcome = "outcome",
  covariates = c("x1", "x2")
)

agd <- set_agd_unanchored(
  data = data$agd,
  treatment = "treatment",
  outcome_n = "n_total",
  outcome_r = "n_events",
  cov_means = c("x1_mean", "x2_mean"),
  cov_sds = c("x1_sd", "x2_sd")
)

# Combine and add integration points
network <- combine_unanchored(ipd, agd)
network <- add_integration_unanchored(
  network,
  n_int = 64,
  x1 = distr(qnorm, mean = x1_mean, sd = x1_sd),
  x2 = distr(qnorm, mean = x2_mean, sd = x2_sd)
)

# Fit ML-UMR model with SPFA
fit <- mlumr(
  data = network,
  spfa = TRUE,
  iter_warmup = 1000,
  iter_sampling = 2000,
  chains = 4
)

# Summary and marginal effects
summary(fit)
marginal_effects(fit, population = "both")

When to Use ML-UMR

Method Data Required Network Type Population Adjustment Effect Modification
MAIC IPD + AgD Disconnected Yes (reweighting) Limited
STC IPD + AgD Disconnected Yes (regression) Yes
ML-NMR IPD + AgD Connected Yes (integration) Yes
ML-UMR IPD + AgD Disconnected Yes (integration) Yes

Citing mlumr

citation("mlumr")

Sofi-Mahmudi, A. (2026). mlumr: Multilevel Unanchored Meta-Regression for Indirect Comparisons. R package version 0.1.0. https://choxos.github.io/mlumr/

When using ML-UMR, please also cite the methodology papers listed above.

Author

Ahmad Sofi-Mahmudi (ORCID)

License

MIT License. See LICENSE file for details.

About

An R package for conducting multilevel unanchored meta-regression (ML-UMR)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •