Conclusion

R provides a credible, transparent, and reproducible alternative to commercial software for many standard sample size calculations in oncology.
For most practical two‑arm designs, alignment with East and nQuery is excellent.
Some niche designs,especially one‑arm survival or exact binary models still require careful interpretation and sometimes additional validation.

Overview of Methods Compared

Endpoint Design Type Test Software 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

Summary of Agreement Between R and Commercial Software

Endpoint Design type Test R/Software matching
survival 2‑Arm fixed design Log‑rank 🟢 Perfect
survival 2‑Arm group‑sequential design Log‑rank 🟡 Good
survival 1‑Arm fixed design Log‑rank 🔵 Poor
Binary 2‑Arm fixed design Exact 🟡 Good
Binary 2‑Arm fixed design Z‑Pooled 🟢 Perfect
Binary 2‑Arm group‑sequential design Z‑Pooled 🟢 Perfect
Binary 1‑Arm fixed design Exact 🟡 Good
Binary 1‑Arm fixed design 1‑Arm Z test 🟢 Perfect

Legend:
🟢 Perfect = identical or extremely close values
🟡 Good = acceptable differences
🔵 Poor = substantial discrepancies requiring caution

Practical Guidance for Package Selection

If you need…

→ Two‑arm survival sample size (fixed or GS)

Use rpact or gsDesign2.
They are stable, well-documented, and closely match commercial software.

→ Two‑arm binary designs

  • Z‑test designsrpact is excellent.
  • Exact testsbbssr is appropriate, but expect minor deviations vs nQuery. bbssr allows better understanting and handling of exact tests.

→ One‑arm binary designs

  • Exact (A’Hern) → implemented manually (no package), results consistent.
  • One‑arm Z‑testrpact again performs well.

→ One‑arm survival

Proceed with caution. Existing R packages use methods that differ from nQuery, leading to inconsistent results. Without consensus, caution is needed and further work may be required.