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.
Key components of the methodology include:
- Time Trend Modeling: The
Timetrend.funutility 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.
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