We demonstrate how rpact enables users to easily define new functions for calculating the number of subjects or events required, based on given conditional power and critical values for specific testing scenarios. This includes the implementation of advanced strategies like the ‘promising zone approach.’
We demonstrate how rpact enables users to easily define new functions for calculating the number of subjects or events required, based on given conditional power and critical values for specific testing scenarios. This includes the implementation of advanced strategies like the ‘promising zone approach.’
These are the packages used for creating this vignette:
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(ggplot2)library(ggpubr)library(rpact)
rpact developer version 4.1.1.9282 loaded
A Motivating Example from Hsiao, Liu, and Mehta (Biometrical Journal, 2019)
Efficacy endpoint PFS
Assumed hazard ratio = 0.67, \(\alpha = 0.025\) and \(\beta = 0.1\) requires 263 events
280 PFS events yields power 91.8 %.
If 350 patients are enrolled over 28 months with a median PFS time of 8.5 months in the control group, the final analysis is expected to be after an additional follow-up of about 12 months
500 PFS events are needed to have 90% power at HR = 0.75 with more patients and a different expected follow-up
“Milestone-based” investment:
Two-stage approach with interim after 140 events
Enough power for detecting HR = 0.67
If conditional power CP for detecting HR = 0.75 falls in a “promising zone”, an additional investment would be made that allows the trial to remain open until 420 PFS events were obtained
Conditional power based on assumed minimum clinical relevant effect HR = 0.75
Promising Zone Design
Number of events for the second stage between 140 and 280
If conditional power for 280 additional events at HR = 0.75 is smaller than \(cp_{min}\), set number of additional events = 140 (non-promising case)
If conditional power for 140 additional events at HR = 0.75 exceeds \(cp_{max}\), set number of additional events = 140, otherwise calculate event number according to \[CP_{HR = 0.75} = cp_{max}\] (promising case)
This defined a promising zone for HR within the sample size may be modified.
# Plot difference in powerggplot(aes(hazardRatio, power, col = design), data = simdata) +theme_classic() +grids(linetype ="dashed") +geom_line(lwd =1.2) +scale_x_continuous(name ="Hazard Ratio") +scale_y_continuous(breaks =seq(0, 1, by =0.1), name ="Power") +geom_vline(xintercept =c(0.67, 0.75), color ="black", lwd =0.9) +scale_color_manual(values =c("#2c7bb6", "#abd9e9", "#fdae61", "#d7191c"))
Difference in Expected Sample Size
# Plot difference in expected sample sizeggplot(aes(hazardRatio, expectedNumberOfEvents, col = design), data = simdata) +theme_classic() +grids(linetype ="dashed") +geom_line(lwd =1.2) +scale_x_continuous(name ="Hazard Ratio") +scale_y_continuous(name ="Expected Events") +scale_color_manual(values =c("#2c7bb6", "#abd9e9", "#fdae61", "#d7191c"))
Summary
Easy implementation in rpact
Simulation very fast
Consideration of efficacy or futility stops straightforward
Trade-off between overall expected sample size and power
Usage of combination test (or equivalent) theoretically mandatory
Adaptations based on test statistic only
References
Wassmer, G and Brannath, W. Group Sequential and Confirmatory Adaptive Designs in Clinical Trials (2016), ISBN 978-3319325606 https://doi.org/10.1007/978-3-319-32562-0
System rpact 4.1.1.9282, R version 4.4.3 (2025-02-28), platform x86_64-pc-linux-gnu
To cite R in publications use:
R Core Team (2025). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
To cite package ‘rpact’ in publications use:
Wassmer G, Pahlke F (2025). rpact: Confirmatory Adaptive Clinical Trial Design and Analysis. R package version 4.1.1.9282, commit 3f693d40890c247cc7106edecf51cd3130d8da83, https://github.com/rpact-com/rpact.