
RPACT Cloud User Requirements Specification
10 June, 2025 06:07:45
Source:vignettes/urs.Rmd
urs.RmdIntroduction
This document describes the user requirements for the application RPACT Cloud, a graphical user interface (GUI) for the rpact R package. The application shall be designed to simplify and standardize the execution of adaptive clinical trial design workflows through an intuitive, web-based interface.
Background
RPACT Cloud shall serve as a front end to the open-source rpact R package, leveraging R Shiny technology to present its functionality in a point-and-click environment. Unlike the open-source rpact package, the Cloud application shall require a commercial license for on-premises installation and operation, ensuring controlled distribution and enterprise support.
Purpose and Scope
The purpose of this user requirements specification (URS) is to define all functional and non-functional requirements that RPACT Cloud must satisfy to meet the needs of biostatisticians, data managers, and clinical operations teams. The scope covers user workflows, data export, reporting, and usability.
Expected Advantages
-
Lower Barrier to Entry
Users shall be able to perform complex trial design and power calculations without prior R programming experience.
-
Seamless Migration
Organizations shall be able to migrate from other proprietary clinical trial design tools to RPACT Cloud with minimal retraining, preserving key study parameters and outputs.
-
Comprehensive Reporting
The system shall generate publication-quality reports in multiple formats (PDF, HTML, Rmd, qmd, R script), enabling easy integration into regulatory submissions and internal documentation.
-
Scenario Comparison
Users shall be able to define and compare multiple trial design scenarios side by side, facilitating data-driven decision making.
Functional Coverage
RPACT Cloud shall support the following features:
-
Design Planning
- Fixed sample designs and group sequential/interim analysis
plans
- Adaptive designs including sample size re-estimation and treatment
selection in multi-arm trials
- Fixed sample designs and group sequential/interim analysis
plans
-
Calculations
- Sample size and power calculations for continuous (means), binary
(rates), and time-to-event (survival) endpoints
- Simulations for means, rates, survival, and count data, with
configurable iterations and seeds
- Sample size and power calculations for continuous (means), binary
(rates), and time-to-event (survival) endpoints
-
Reporting & Export
- Tabular and graphical summaries of design parameters and simulation
outcomes
- Export options to PDF, HTML, RMarkdown (Rmd), Quarto (qmd), and R script
- Tabular and graphical summaries of design parameters and simulation
outcomes
This URS shall serve as the foundation for subsequent design, development, testing, and validation activities. All requirements shall be traceable to corresponding test cases to ensure full coverage and regulatory compliance.
Requirements
URS-001 - Creation of New Default Design
The system shall allow the user to create a new default design, which includes:
- A summary of the design parameters
User scenario:
- Create a new design
- Check for expected sections in the design summary
URS-002 - Fixed Design for Means with 1 Group
The system shall perform fixed-design calculations for single-group mean analyses, automatically determining and reporting the required sample size, power, simulated power, and associated statistical parameters.
User scenario:
Scenario 1: Fixed design, sample size calculation (Means, 1 Group)
- Verify displayed R code for sample size calculation
- Set output type to PRINT and verify print output details
- Set output type to SUMMARY and verify summary output details
Scenario 2: Fixed design, power calculation (Means, 1 Group)
- Verify R code for power calculation
- Verify summary output details for power calculation
Scenario 3: Fixed design, power simulation (Means, 1 Group)
- Set seed for reproducibility and maximum number of iterations
- Verify R code for power simulation
- Verify summary output details for simulation
Scenario 4: Comparison table (initial and transposed)
- Switch to comparison table and verify output
- Verify data integrity of the initial comparison table
- Transpose comparison table and verify data integrity
- Validate lower camel case for parameter names in the transposed comparison table
URS-003 - Fixed Design Calculations for Three-Group Mean Scenario
The system shall perform fixed-design calculations for a three-group mean analysis scenario, automatically determining and reporting:
- planned sample size per arm
- allocation ratio
- maximum number of simulation iterations
- statistical parameters including power and rejection probabilities
- stage-wise subject number summaries
- formatted output for both PRINT and SUMMARY modes
User scenario:
- Start the application
- Select three-group means scenario
- Set seed for reproducibility
- Set maximum number of subjects to 200
- Set the allocation ratio to 2, i.e., 2:2:1
- Verify generated R code includes correct function and parameters
- Set output type to PRINT and verify print output details
- Set output type to SUMMARY and verify summary output details
- Adjust standard deviation and alternative effect sizes
- Verify R code
- Verify summary output details
- Stop the application
URS-004 - Fixed Design for Rates with Single Group
The system shall perform fixed-design calculations for single-group rate analyses, automatically determining and reporting:
- required sample size
- null and alternative event rates
- confidence limits
- statistical power
- formatted output in PRINT and SUMMARY modes
User scenario:
Scenario 1: Fixed design sample size calculation (Rates, 1 Group)
- Set event rate steps to 2 and null hypothesis rate to 0.55
- Verify R code for sample size
- Set output type to PRINT and verify print output details
- Set output type to SUMMARY and verify summary output details
Scenario 2: Power calculation (Rates, 1 Group)
- Verify R code for power calculation
- Verify summary output details for power calculation
Scenario 3: Power simulation (Rates, 1 Group)
- Set event rate steps to 2 and null hypothesis rate to 0.55
- Set seed for reproducibility and maximum number of iterations
- Verify R code for simulation
- Verify summary output details for simulation
Scenario 4: Comparison table
- Switch to comparison table and verify output
- Set nice column names enabled and verify output
URS-005 - Fixed Design for Survival with Two Groups
The system shall perform fixed-design calculations for two-group survival analyses, automatically determining and reporting:
- required number of events and/or subjects
- null and alternative hazard ratios
- confidence intervals
- statistical power
- design parameters for interim analyses including stopping boundaries
- formatted output in PRINT and SUMMARY modes
User scenario:
Scenario 1: Fixed design sample size calculation (Survival, 2 Groups)
- Open design tab
- Set beta to 0.1
- Verify the displayed R code of the design
- Set output type to PRINT and verify print output details
- Set output type to SUMMARY and verify summary output details
- Open design plan tab
- Verify the displayed R code of the design plan
- Set output type to PRINT and verify print output details
- Set output type to SUMMARY and verify summary output details
Scenario 2: Power calculation (Survival, 2 Groups)
- Verify the displayed R code of the design plan
- Verify the summary output
Scenario 3: Power simulation (Survival, 2 Groups)
- Set seed for reproducibility and maximum number of iterations
- Verify the displayed R code of the design plan
- Verify the summary output
Scenario 4: Comparison table
- Switch to comparison table and verify output
- Set nice column names enabled and verify output
URS-006 - Survival Simulation for Two Stages and Two Arms
The system shall perform survival simulation for two stages and two arms, automatically determining and reporting:
- planned sample size per arm
- maximum number of simulation iterations
- statistical parameters including power and rejection probabilities
User scenario:
- Navigate to two-stages tab (kMax = 2)
- Navigate to the survival endpoint tab
- Navigate to the one-group tab
- Set the seed for reproducibility
- Set the maximum number of iterations to 200
- Apply the planned subjects in the input table
- Verify the generated R code includes the correct function and parameters
- Verify the summary output
- Switch to the Reporting tab
- Verify the generated report
URS-007 - Report Generation
The system shall generate a report in markdown format, which includes:
- A summary of the design parameters
User scenario:
- Create a new design
- Navigate to the Reporting tab
- Check for expected sections in the report
URS-008 - GUI vs. Package Result Consistency
The system shall ensure that results configured through the RPACT Cloud GUI exactly match the outputs of the validated rpact R package for inverse normal design planning and survival power simulations. This includes both the generated R code and the printed summary outputs.
User scenario:
- Launch the RPACT Cloud application and set a reproducible window size
- Create a new design by clicking “Create new design”
- In R, compute an inverse normal design using
rpact::getDesignInverseNormal()with kMax=2, alpha=0.01, beta=0.1, typeOfDesign=“asOF”, typeBetaSpending=“bsP” - In the GUI, set the same parameters int the tab “Design Interim
Stages”:
-
kMax= 2 -
alpha= 0.01 -
beta= 0.1 -
typeOfDesign= “asOF” -
typeBetaSpending= “bsP”
-
- Navigate to the “Plan a Trial” tab in the GUI
- In R, run
designPlan <- rpact::getSimulationSurvival()on the design object with:- plannedEvents = c(50, 100)
- pi1 = c(0.3, 0.9)
- pi2 = 0.6
- maxNumberOfSubjects = 120
- accrualTime = c(0, 15)
- dropoutRate1 = 0.1, dropoutRate2 = 0.1, dropoutTime = 15
- eventTime = 8, allocation2 = 2
- maxNumberOfIterations = 200, seed = 123
- In the GUI, select endpoint = “Survival” and calculation target = “Power simulation”
- Configure survival parameters in the GUI to mirror the R function
call:
-
pi (1): # values= 2,pi (1): From= 0.3,pi (1): To= 0.9 -
pi (2)= 0.6,Event time= 8,Seed= 123 -
Iterations= 200,Allocation (2)= 2 - Switch to tab “Accrual” and set
Max number of subjects= 120,Accrual time= 15,Dropout rate (1)= 0.1,Dropout rate (2)= 0.1,Dropout rate time= 15
-
- Set
Planned events= c(50, 100) and click theApplybutton - Retrieve the generated R code from the GUI and trim summary pipe commands.
- Compare the trimmed GUI code string to the R object code captured
from
designPlan - Retrieve the GUI summary output and compare it to
summary(designPlan)output - Stop the application