Introduction
Purpose of this Project
This project aims to systematically compare sample size calculations across commonly used commercial software (East, nQuery) and their open‑source R counterparts.
The goal is to help clinical researchers and statisticians:
- understand how different tools implement similar methods,
- detect discrepancies in sample size computation,
- identify R packages offering reliable alternatives to proprietary solutions,
- promote transparent, reproducible workflows based entirely in R.
The project covers binary and survival endpoints, with both fixed and group‑sequential designs.
Why perform sample size calculations in R?
Although East and nQuery are widely used in industry, relying solely on commercial software can introduce limitations.
Using R for sample size determination provides several advantages:
- Unified workflow: keep all works in R, from sample size to simulation to final reporting.
- Reproducibility & transparency: code is inspectable, version‑controlled, and easy to share.
- Better communication: providing a script is clearer and more portable than sharing a proprietary project file.
- No export issues: avoid rounding inconsistencies or undocumented formulas.
- Open-source ecosystem: users can open issues, request features, or even contribute code.
Software and R Packages Compared
Commercial software
- East 6
- nQuery 9.2
R packages
- rpact 4.2.0 – group-sequential & adaptive designs
- gsDesign2 1.1.7 – modern group‑sequential framework, survival included
- Rashnu 0.1.2 – design & analysis of survival endpoints
- bbssr 1.0.2 – blinded sample size re‑estimation for binary outcomes
- OneArm2stage 1.1.2 – single‑arm two‑stage designs
- SampleSizeSingleArmSurvival – sample size for single‑arm survival studies
Scope of the Comparison
This study covers all major trial‑design configurations for Survival and Binary endpoints, including one‑arm and two‑arm with both fixed and group‑sequential designs. The comparison grid is presented below:
| Endpoint | Design Type | Test / Method | Commercial Tools | R Packages |
|---|---|---|---|---|
| Survival | Two‑arm Fixed | Log-rank | East, nQuery | rpact, Rashnu, gsDesign2 |
| Survival | Two‑arm Group‑Sequential | Log-rank | East, nQuery | rpact, gsDesign2 |
| Survival | One‑arm Fixed | Log-rank | East, nQuery | OneArm2stage, SampleSizeSingleArmSurvival, Rashnu |
| Binary | Two‑arm Fixed | Z‑Pooled | East, nQuery | rpact |
| Binary | Two‑arm Fixed | Exact | East, nQuery | bbssr |
| Binary | Two‑arm Group‑Sequential | Z‑Pooled | East | rpact |
| Binary | One‑arm Fixed | Exact | East | A’Hern (no package) |
| Binary | One‑arm Fixed | 1‑arm Z‑test | East, nQuery | rpact |
Each of these designs is covered in depth throughout the website, with dedicated pages for Survival and Binary endpoints across all configurations:
Survival designs
- Two‑arm Fixed — Log‑rank methods
- Two‑arm Group‑Sequential — Log‑rank with interim monitoring
- One‑arm Fixed — Log‑rank–based single‑arm methods
Binary designs
- Two‑arm Fixed — Z‑pooled and exact methods
- Two‑arm Group‑Sequential — Z‑pooled with interim analyses
- One‑arm Fixed — One‑arm Z‑test and exact approaches