Learn R Programming

outstandR: Outcome regression standardisation

Indirect treatment comparison with limited subject-level data

Overview

{outstandR} is an R package designed to facilitate outcome regression standardisation using model-based approaches, particularly focusing on G-estimation. The package provides tools to apply standardisation techniques for indirect treatment comparisons, especially in scenarios with limited individual patient data.

Who is this package for?

The target audience of {outstandR} is those who want to perform model-based standardization in the specific context of two-study indirect treatment comparisons with limited subject-level data. This is model-based standardization with two additional steps:

  1. Covariate simulation (to overcome limited subject-level data for one of the studies)
  2. Indirect comparison across studies

Installation

Install the development version from GitHub using R-universe:

install.packages("outstandR", repos = c("https://statisticshealtheconomics.r-universe.dev", "https://cloud.r-project.org"))

Alternatively, you may wish to download directly from the repo with remotes::install_github("StatisticsHealthEconomics/outstandR").

Background

Population adjustment methods are increasingly used to compare marginal treatment effects when there are cross-trial differences in effect modifiers and limited patient-level data.

The {outstandR} package allows the implementation of a range of methods for this situation including the following:

  • Matching-Adjusted Indirect Comparison (MAIC) is based on propensity score weighting, which is sensitive to poor covariate overlap and cannot extrapolate beyond the observed covariate space. It reweights the individual patient-level data (IPD) to match the aggregate characteristics of the comparator trial, thereby aligning the populations.

  • Simulated Treatment Comparison (STC) relies on outcome regression models fitted to IPD, conditioning on covariates to estimate the effect of treatment. These estimates are then applied to the aggregate-level comparator population. Like MAIC, STC is limited by its conditional nature and can produce biased marginal estimates if not properly marginalized.

  • Parametric G-computation with maximum likelihood: This method fits an outcome model to the IPD using maximum likelihood estimation, then uses that model to predict outcomes in the comparator population. It allows extrapolation beyond the observed covariate space but requires correct specification of the outcome model to avoid bias.

  • Parametric G-computation with Bayesian inference: Similar to the maximum likelihood version, this approach fits an outcome model but within a Bayesian framework. It allows coherent propagation of uncertainty through prior distributions and posterior inference, enabling probabilistic sensitivity analysis and full uncertainty quantification.

  • Multiple imputation marginalization method based on parametric G-computation: Current outcome regression-based alternatives can extrapolate but target a conditional treatment effect that is incompatible in the indirect comparison. When adjusting for covariates, one must integrate or average the conditional estimate over the relevant population to recover a compatible marginal treatment effect. This can be easily applied where the outcome regression is a generalized linear model or a Cox model. The approach views the covariate adjustment regression as a nuisance model and separates its estimation from the evaluation of the marginal treatment effect of interest. The method can accommodate a Bayesian statistical framework, which naturally integrates the analysis into a probabilistic framework.

General problem

Consider one trial, for which the company has IPD, comparing treatments A and C, from herein call the AC trial. Also, consider a second trial comparing treatments B and C, similarly called the BC trial. For this trial only published aggregate data are available. We wish to estimate a comparison of the effects of treatments A and B on an appropriate scale in some target population P, denoted by the parameter $d_{AB(P)}$. We make use of bracketed subscripts to denote a specific population. Within the BC population there are parameters $\mu_{B(BC)}$ and $\mu_{C(BC)}$ representing the expected outcome on each treatment (including parameters for treatments not studied in the BC trial, e.g. treatment A). The BC trial provides estimators $\bar Y_{B(BC)}$ and $\bar Y_{C(BC)}$ of $\mu_{B(BC)}$, $\mu_{C(BC)}$, respectively, which are the summary outcomes. It is the same situation for the AC trial.

For a suitable scale, for example a log-odds ratio, or risk difference, we form estimators $\Delta_{BC(BC)}$ and $\Delta_{AC(AC)}$ of the trial level (or marginal) relative treatment effects. We shall assume that this is always represented as a difference so, for example, for the risk ratio this is on the log scale.

$$ \Delta_{AB(BC)} = g(\bar{Y}{B{(BC)}}) - g(\bar{Y}{A{(BC)}}) $$

References

This R package contains code originally written for the papers:

Remiro-Azócar, A., Heath, A. & Baio, G. (2022) Parametric G-computation for Compatible Indirect Treatment Comparisons with Limited Individual Patient Data. Res Synth Methods;1–31.

and

Remiro-Azócar, A., Heath, A., & Baio, G. (2023) Model-based standardization using multiple imputation. BMC Medical Research Methodology, 1–15. https://doi.org/10.1186/s12874-024-02157-x

Contributing

We welcome contributions! Please submit contributions through Pull Requests, following the contributing guidelines. To report issues and/or seek support, please file a new ticket in the issue tracker.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

[!NOTE] This package is licensed under the GPLv3. For more information, see LICENSE.

Copy Link

Version

Install

install.packages('outstandR')

Version

1.0.0

License

GPL (>= 3)

Maintainer

Nathan Green

Last Published

January 21st, 2026

Functions in outstandR (1.0.0)

calculate_trial_mean_count

Calculate Trial Mean Count Data
calculate_trial_mean_continuous

Calculate Trial Mean Continuous Data
calc_gcomp_ml

G-computation Maximum Likelihood Bootstrap
get_allowed_var_methods

Retrieve list of allowed variance methods
gcomp_ml.boot

Bootstrap for G-computation via Maximum Likelihood
gcomp_ml_means

G-computation maximum likelihood mean outcomes by arm
calculate_trial_variance_count

Calculate trial variance count
calculate_trial_mean

Calculate Trial Mean Wrapper
marginal_treatment_effect

Marginal treatment effect from reported event counts
maic_weights

Estimate MAIC weights
estimate_var_sandwich

Estimate Variance Sandwich Estimator
get_covariate_names

Get covariate names
cor2cov

Compute covariance matrix
get_comparator

Get study comparator treatment names
maic.boot

MAIC bootstrap sample
outstandR

Calculate the difference between treatments using all evidence
calculate_trial_mean_binary

Calculate Trial Mean Binary Data
plot.outstandR

Default Plot Method for outstandR Objects
check_formula

Check formula
get_ref_trt

Get reference treatment
outstandR-package

outstandR: Model-Based Standardisation for Indirect Treatment Comparison with Limited Subject-Level Data
prep_ald

Prepare Aggregate Level Data
get_robust_vcov

Compute Robust Covariance Matrix (HC0-style)
get_eff_mod_names

Get effect modifiers
continuity_correction

Continuity Correction
marginal_variance

Marginal effect variance using the delta method
strategy-class

Strategy class and subclasses
strategy_maic

New strategy objects
summary.outstandR

Summary method for outstandR
simulate_ALD_pseudo_pop

Simulate Aggregate-Level Data Pseudo-Population
var_by_pooling

Variance estimate by pooling
validate_outstandr

Input data validator
prep_ipd

Prepare Individual Patient Data
reshape_ald_to_wide

Convert aggregate data from long to wide format
get_treatment_effect

Get treatment effect scale corresponding to a link function
get_treatment_name

Get treatment name
result_stats

Calculate and arrange result statistics
get_var_method

Determine and validate variance method for a strategy
outstandR-class

outstandR class
wald_type_interval

Wald-type interval estimates
num_grad

Numerical Gradient
print.outstandR

Print a Summary of a outstandR Object
guess_treatment_name

Guess treatment name
reshape_ald_to_long

Convert aggregate data from wide to long format
prepare_covariate_distns

Prepare Covariate Distributions
calc_ALD_stats

Aggregate-level data mean and variance statistics
AC_IPD_binY_contX

Individual-level patient data for binary outcome, continuous covariates
calc_IPD_stats

Calculate individual-level patient data statistics
calc_gcomp_bayes

Bayesian G-computation using Stan
BC_ALD_binY_contX

Aggregate level patient data for binary outcome, continuous covariates
IPD_stat_factory

Factory function for creating calc_IPD_stats methods
calc_maic

Calculate MAIC
AC_IPD_contY_mixedX

Individual-level patient data for continuous outcome, mixed covariates
Q

Objective function to minimize for standard method of moments MAIC
AC_IPD_countY_contX

Individual-level patient data for count outcome, continuous covariates
calculate_trial_variance

Calculate trial variance
calc_mim

Multiple imputation marginalization (MIM)
calculate_trial_variance_binary

Calculate trial variance binary
BC_ALD_contY_mixedX

Aggregate level patient data for continuous outcome, mixed covariates
BC_ALD_countY_contX

Aggregate level patient data for count outcome, continuous covariates
calculate_ate

Calculate Average Treatment Effect
calculate_trial_variance_continuous

Calculate trial variance continuous
calc_stc

Calculate simulated treatment comparison statistics