drMAIC

Doubly Robust Matching-Adjusted Indirect Comparison for Health Technology Appraisal

Overview

drMAIC implements the Doubly Robust Matching-Adjusted Indirect Comparison (DR-MAIC) estimator for population-adjusted indirect treatment comparisons in HTA submissions. It is designed for the common regulatory scenario where one trial has individual patient data (IPD) and a comparator has only aggregate data (AgD).

Why DR-MAIC?

Standard MAIC depends entirely on the weighting model being correctly specified. DR-MAIC is consistent if either the weight model or the outcome regression model is correctly specified — the double robustness property.

θ_DR = θ_STC + Σ ωᵢ(Yᵢ - m̂(Xᵢ))
         ↑                ↑
   outcome model    IPW bias correction

Guideline Alignment

Body Guidance Coverage
NICE DSU TSD 18 (Phillippo et al., 2016) Weight estimation, ESS, balance, CIs
Cochrane Handbook Chapter 23 Transitivity, consistency assumptions
ISPOR ITC Task Force Sensitivity analysis, uncertainty reporting
Remiro-Azócar et al. (2022) Stat Med DR estimation framework

Installation

# From GitHub (development version)
# install.packages("remotes")
remotes::install_github("heor/drMAIC")

# From CRAN (when available)
install.packages("drMAIC")

Quick Start

library(drMAIC)

# Load example NSCLC data
data(nsclc_ipd)   # IPD from index trial
data(nsclc_agd)   # Aggregate data from comparator

# --- Step 1: Compute MAIC weights ---
w <- compute_weights(
  ipd            = nsclc_ipd,
  target_moments = c(age    = nsclc_agd$mean_age,
                     ecog   = nsclc_agd$prop_ecog1,
                     smoker = nsclc_agd$prop_smoker),
  match_vars     = c("age", "ecog", "smoker")
)

# --- Step 2: DR-MAIC estimation ---
result <- dr_maic(
  maic_weights        = w,
  outcome_var         = "response",
  outcome_type        = "binary",
  comparator_estimate = nsclc_agd$response_rate,
  comparator_se       = nsclc_agd$response_se,
  effect_measure      = "OR"
)
print(result)

# --- Step 3: Diagnostics ---
diag <- maic_diagnostics(w)
diag$love_plot      # Love plot
diag$weight_plot    # Weight distribution

# --- Step 4: Assumption checks ---
check_assumptions(w, result)

# --- Step 5: Bootstrap CIs ---
boot <- bootstrap_ci(result, R = 1000, ci_type = "bca", seed = 42)
print(boot)

# --- Step 6: Sensitivity analysis ---
sa <- sensitivity_analysis(result, lovo = TRUE)
sa$evalue        # E-value for unmeasured confounding
sa$trim_plot     # Weight trimming sensitivity

# --- Step 7: NICE submission report ---
nice_report(result, boot, sa,
            study_a_name  = "KEYNOTE-024",
            study_b_name  = "IMpower150",
            indication    = "Advanced NSCLC",
            treatment_a   = "Pembrolizumab",
            treatment_b   = "Atezolizumab + Bev + Chemo")

Core Functions

Function Description
compute_weights() Entropy balancing / exponential tilting for MAIC weights
dr_maic() Doubly robust MAIC estimator (+ standard MAIC and STC)
maic_diagnostics() Love plot, SMDs, weight distribution, ESS
check_assumptions() Structured NICE/Cochrane assumption checklist
bootstrap_ci() BCa / percentile bootstrap confidence intervals
sensitivity_analysis() E-values, weight trimming, leave-one-variable-out
nice_report() NICE TSD 18-aligned submission report

Supported Outcomes

Outcome type Effect measures
Binary Risk difference (RD), Risk ratio (RR), Odds ratio (OR)
Continuous Mean difference (MD)
Time-to-event Hazard ratio (HR) via weighted Cox model

Key References


Citation

citation("drMAIC")
To cite drMAIC in publications use:

  drMAIC: Doubly Robust Matching-Adjusted Indirect Comparison for HTA.
  R package version 0.1.0. https://github.com/heor/drMAIC

A BibTeX entry for LaTeX users is:
  @Manual{drMAIC2024,
    title  = {drMAIC: Doubly Robust Matching-Adjusted Indirect Comparison},
    year   = {2024},
    note   = {R package version 0.1.0},
    url    = {https://github.com/heor/drMAIC}
  }

License

GPL (≥ 3)