BayesianPlatformDesignTimeTrend: Simulate and Analyse Bayesian Platform Trial with Time Trend

Ziyan WangOpenalex Unknown 2023 · DOI · OpenAlex

Abstract

Platform trials represent a modern paradigm in clinical research, allowing for the simultaneous evaluation of multiple treatments under a single master protocol. However, their long-running nature makes them susceptible to "time trends"—temporal shifts in patient outcomes due to external factors like changes in standard of care. The BayesianPlatformDesignTimeTrend R package provides a comprehensive simulation framework using the rstan package to model these trials. It supports both fixed-ratio and Bayesian Adaptive Randomization (BAR) and includes specialized tools to simulate and mitigate the impact of time trends on trial validity.

Introduction

Platform trials are dynamic environments where new treatment arms can be added and existing ones dropped based on interim analyses. While efficient, this flexibility introduces statistical challenges, most notably the time trend effect. A time trend occurs when the underlying response probability for patients changes over the course of the trial, independent of the treatment effect. If a new arm is added during a period of improved general patient outcomes, it may appear more effective than earlier arms simply due to this temporal drift.

BayesianPlatformDesignTimeTrend addresses this by allowing researchers to simulate various trend patterns and test the robustness of different analysis models, ensuring that trial adaptations like BAR do not lead to biased conclusions.

Methodology and Simulation Framework

The package integrates high-quality posterior sampling via rstan into a unified simulation loop. It implements advanced Bayesian Adaptive Randomization (BAR) algorithms based on the work of Trippa et al. (2012) and Wathen et al. (2017). These algorithms adjust treatment allocation probabilities based on accumulating evidence of efficacy.

To accurately reflect real-world complexities, the package provides a wide array of parameters for its simulation functions. These include cohort sizes, response probabilities, and specific time trend functions.

The simulation functions utilize a comprehensive set of parameters to define trial behavior, including specific variables for modeling temporal shifts like `trend.function` and `trend.effect`.

Key components of the methodology include:

  • Time Trend Modeling: The Timetrend.fun utility allows users to simulate linear, step, or plateau trend patterns.
  • Automated Boundary Construction: Functions are provided to establish stopping boundaries for efficacy and futility, such as Early-Pocock or O'Brien-Fleming boundaries.
  • Gaussian Process Optimization: For complex designs, the package supports Bayesian optimization to find optimal decision cutoffs that balance Type I error and statistical power.

Protecting Trial Integrity

A core insight provided by the package is the potential interaction between BAR and time trends. If a negative time trend makes the control group appear to perform worse over time, BAR might prematurely funnel patients into a mediocre treatment arm. To combat this, the package includes tuning parameters to maintain internal validity.

Parameters such as `max.ar` are essential for setting upper boundaries on randomization ratios, preventing the premature depletion of the control arm.

By utilizing the max.ar parameter, researchers can ensure that the control arm remains sufficiently populated to provide a valid baseline for comparison throughout the trial's duration, even when adaptive randomization is active.

Operating Characteristics and Results

The package includes pre-computed datasets, such as OPC_null and OPC_alt, which serve as benchmarks for trials simulated under various scenarios. For instance, in an alternative scenario with a "step" time trend, the package can output detailed metrics including:

  • Power and Type I Error: Standard measures of statistical performance.
  • Bias and rMSE: Quantitative assessments of how much the time trend has skewed the estimated treatment effect.
  • Patient Allocation: Data on how BAR reacted to the evolving evidence and the simulated trend.

Conclusion and Future Directions

BayesianPlatformDesignTimeTrend offers a vital toolset for the design of modern, adaptive clinical trials. By explicitly modeling time trends, it allows statisticians to quantify risks that are often ignored in simpler simulation frameworks.

Future development of the package aims to include a wider variety of randomization algorithms, such as double biased coin methods, and to expand the scope of outcome models beyond logistic regression to include time-to-event data. While computationally intensive due to its reliance on MCMC sampling, the package remains a robust solution for ensuring the reliability of platform trial designs in the face of temporal drift.

Summary updated

Abstract

Simulating the sequential multi-arm multi-stage or platform trial with Bayesian approach using the 'rstan' package, which provides the R interface for the Stan. This package supports fixed ratio and Bayesian adaptive randomization approaches for randomization. Additionally, it allows for the study of time trend problems in platform trials. There are demos available for a multi-arm multi-stage trial with two different null scenarios, as well as for Bayesian trial cutoff screening. The Bayesian adaptive randomisation approaches are described in: Trippa et al. (2012) &lt;<a href="https://doi.org/10.1200%2FJCO.2011.39.8420" target="_top">doi:10.1200/JCO.2011.39.8420</a>&gt; and Wathen et al. (2017) &lt;<a href="https://doi.org/10.1177%2F1740774517692302" target="_top">doi:10.1177/1740774517692302</a>&gt;. The randomisation algorithm is described in: Zhao W &lt;<a href="https://doi.org/10.1016%2Fj.cct.2015.06.008" target="_top">doi:10.1016/j.cct.2015.06.008</a>&gt;. The analysis methods of time trend effect in platform trial are described in: Saville et al. (2022) &lt;<a href="https://doi.org/10.1177%2F17407745221112013" target="_top">doi:10.1177/17407745221112013</a>&gt; and Bofill Roig et al. (2022) &lt;<a href="https://doi.org/10.1186%2Fs12874-022-01683-w" target="_top">doi:10.1186/s12874-022-01683-w</a>&gt;.
BibTeX
@inproceedings{wang2023bayesianplatformdesigntimetrend,
  author = {Ziyan Wang},
  title = {{BayesianPlatformDesignTimeTrend: Simulate and Analyse Bayesian Platform Trial with Time Trend}},
  booktitle = {Openalex Unknown},
  year = {2023},
  doi = {10.32614/cran.package.bayesianplatformdesigntimetrend},
}
Figure