gsDesign (development version)
New features
- Added
testUpper,testLower, andtestHarmparameters togsDesign(),gsSurv(), andgsSurvCalendar()for selective bound testing at interim analyses. Each accepts a logical scalar or vector of lengthkspecifying which analyses should include that boundary. Inactive bounds are set to extreme values (±20 on Z-scale) and displayed asNAinprint()andgsBoundSummary()output. This enables designs such as futility-only at early interims, deferred efficacy testing, or selective harm monitoring (@keaven, #141). - Added
test.type = 7(binding futility and binding harm bounds) andtest.type = 8(non-binding futility and non-binding harm bounds) togsDesign(),gsSurv(), andgsSurvCalendar(). These three-boundary designs support monitoring for efficacy, futility, and potential harm simultaneously, motivated by FDA guidance on overall survival monitoring in oncology trials (@keaven, #237). - New
sfharmandsfharmparamparameters control the spending function for the harm bound independently from efficacy and futility spending (@keaven, #237). - All six
plot()types,gsBoundSummary(),print(),summary(), andxtable()methods support the new three-boundary designs (@keaven, #237). - Added
HarmBoundvignette demonstrating harm bound design and interpretation (@keaven, #237). - Survival design functions (
nEvents(),nSurv(),gsSurv(),gsSurvCalendar()) now supporthr > hr0for time-to-event designs where a larger hazard ratio is the alternative hypothesis. This enables direct specification of designs for time-to-response, safety endpoints, or reversed HR conventions. All sample size methods (Lachin-Foulkes, Schoenfeld, Freedman, Bernstein-Lagakos) and plotting functions handle both directions symmetrically (@keaven, #251). - New
gsSurvPower()function computes power for a group sequential survival design with specified enrollment, dropout, treatment effect, and analysis timing. UnlikegsSurv()andgsSurvCalendar()which solve for sample size,gsSurvPower()takes fixed assumptions and computes power. Supports calendar-time and event-driven timing, stratified designs, all test types (1–8 including harm bounds), and flexible analysis timing criteria (targetEvents,plannedCalendarTime,maxExtension,minTimeFromPreviousAnalysis,minN,minFollowUp). When an existinggsSurvdesign is provided viax, parameters can be selectively overridden for “what-if” sensitivity analyses. Changingalphapreserves original futility bounds (followinggsBoundSummary()convention) while recomputing efficacy bounds (@keaven, #109). -
gsSurvPower()now supportsinformationRatesto cap spending at planned versus realized information fractions andfullSpendingAtFinalto force the final spending fraction to 1 when desired. This makes it easier to evaluate delayed event accrual while keeping spending tied to a planned information schedule. It also preserves the original one-sided versus two-sided design convention when inheriting defaults from an existinggsSurvobject (#258). - New vignette “Power Computation for Group Sequential Survival Designs” (
vignette("gsSurvPower")) with worked examples for sensitivity analysis, alpha reallocation, biomarker subgroup to stratified design, and event-driven timing (@keaven, #109). - Added
repeatedPValueBinomialExact()andsequentialPValueBinomialExact()to compute repeated and sequential exact-binomial p-values under spending function designs derived fromgsSurv()objects (1922429e). - Added
simBinomialSeasonalExact()to run fixed and blinded-adaptive seasonal rare-event simulations with exact-binomial efficacy monitoring summaries (1922429e). -
toBinomialExact()now supports explicit spending-time overrides viausTimeandlsTime(fortest.type = 4) to align withgsDesign()andgsSurv()conventions when updating bounds withobservedEvents(1922429e). -
simBinomialSeasonalExact()now supportsusTime/lsTimeinputs and reports futility stopping probabilities (futility_stop_ratewithfutility_mc_se) in scenario summaries (1922429e). -
simBinomialSeasonalExact()now acceptsve = 0andve < 0, allowing null-hypothesis (ve = 0) and non-inferiority margin (ve < 0) scenarios. Validation now requires only thatvevalues are finite and less than 1. A feasibility check verifies that the implied experimental-arm event rates (control_event_rate * (1 - ve)) remain in[0, 1)(#267).
Bug fixes
-
nSurv()andgsSurv()now use the requested survival sample size method when eitherTorminfupisNULL.gsSurv()also uses the input accrual rate and duration when bothTandminfupareNULL, solving follow-up duration against the final group-sequential event requirement. This allows Schoenfeld survival designs to reproduce SAS PROC SEQDESIGN’s fixed-accrual follow-up solve (#270). -
simBinomialSeasonalExact()now stops simulated trials at the first efficacy or futility boundary crossing for reporting stopping time, total events, and total enrollment, while preserving the non-binding futility convention for efficacy crossing probability. The simulation also updates exact-binomial bounds within each trial using the observed total event counts and defaults fixed per-season enrollment to the design’s planned seasonal enrollment (#264). -
toInteger()now preserves selective-bound flags (testUpper,testLower,testHarm) and harm-bound spending (sfharm,sfharmparamfortest.type7 or 8) when recomputing the design after integer sample size or event-count rounding. Previously the internalgsDesign()call omitted these settings, so inactive looks could incorrectly become active (#261). -
toInteger()now preserves the intended survival-design behavior thatroundUpFinal = TRUErounds the final event count up. If the independently rounded final sample size, using the usualratio + 1allocation multiple, cannot support the integer event target,toInteger()adjusts sample size by allocation multiples, with a warning, until the target is achievable. Designs where the rounded sample size already supports the integer event target retain the previous behavior (#264). -
toInteger()survival integerization now keeps the calendar design fixed while deriving interim integer events from timing and final integer event target. Enrollment is inflated minimally by scaling accrual rates and then rounded to allocation multiples, avoiding unnecessary calendar-extension-driven enrollment increases for small final-event rounding changes. A variable-duration fallback is retained with a warning when fixed-calendar inflation is infeasible (#271). - Fixed sign inconsistency in
hrn2z()which usedsign(hr0 - hr1)whilezn2hr()usedsign(hr1 - hr0), preventing correct round-trip conversion. Both now usesign(hr1 - hr0)(@keaven, #251). - Fixed
toBinomialExact()one-sided (test.type = 1) updating withobservedEventsso futility-adjustment code is only executed whentest.type = 4(1922429e). -
toBinomialExact()now respects selective futility testing (testLower) when present on agsSurvobject by flattening lower spending at inactive looks (1922429e).
Documentation
- Updated the
SeqDesignSurvivalvignette to use the one-sidedgsSurv()alpha convention when reproducing SAS PROC SEQDESIGN fractional-time survival output (#264). - Corrected and generalized the multi-season rare-event vignette so enrollment timing, planned counts, and simulation event-rate inputs are derived from the stated design specifications, with calendar-timed seasonal analyses, piecewise seasonal failure hazards, and cross-references to the exact binomial vaccine-efficacy vignette (#264).
- Expanded
toInteger()help and vignette guidance for survival-design final event rounding, final sample-size feasibility adjustment, and seasonal designs with a final zero event-rate period (#264). - Documented
test.typerestriction intoBinomialExact(): onlytest.type = 1and4are supported; other types (including 7 and 8) produce an error (@keaven, #109). - Consolidated shared roxygen2
@paramdocumentation using@inheritParamsso thattest.type, spending function parameters, and other shared arguments are defined once ingsDesign()ornSurv()and inherited bygsSurv()andgsSurvCalendar()(@keaven, #237). - New vignette “Selective bound testing at interim analyses” (
vignette("SelectiveBoundTesting")) with worked examples for all supported scenarios (@keaven, #255). - Expanded
gsSurvPower()documentation and vignette guidance forinformationRates, calendar spending, andfullSpendingAtFinal, including a corrected worked example of the spending fractions used at the final analysis (#258). - Clarified the PROC SEQDESIGN survival vignette comparison by using
test.type = 2,alpha = 0.025,method = "Schoenfeld", andT = minfup = NULLto match SAS’s symmetric two-sided fixed-accrual design, and by separating fractional-time output from the SAS ceiling-time adjusted design (#270). - Added vignette “Multi-season studies for rare events” (
vignette("MultiSeasonRareEvents")) demonstrating exact-binomial seasonal monitoring, analysis-time bound updates viatoBinomialExact(observedEvents = ...), and blinded information-adaptive enrollment scenarios (1922429e). - Expanded the multi-season vignette with: initial
gsBoundSummary()output, IA1-only futility illustration, VE and nominal one-sided p-values at exact-binomial bounds, and clearer simulation tables including efficacy and futility stopping probabilities with non-binding Type I interpretation notes (c1065ea8, 2e9260bd). - Reorganized pkgdown article sections to separate general materials, exact binomial workflows, and multiple-hypothesis-testing content (67146132).
Testing
- Added
toInteger()regression tests for selective-bound preservation ongsDesignandgsSurvobjects, includingtest.type8 with custom harm spending (#261). - Added focused
gsSurvPower()regression tests forinformationRates,fullSpendingAtFinal, and inherited sidedness behavior from existing time-to-event designs (#258). - Added independent tests for exact-binomial repeated/sequential p-values and for
simBinomialSeasonalExact()input validation, reproducibility, and adaptive enrollment behavior (1922429e, c1065ea8). - Added regression test confirming
toBinomialExact()one-sided (test.type = 1) updates withobservedEvents(1922429e). - Added regression tests for
toBinomialExact()usTime/lsTimeoverrides and selective-futility behavior, plus tests for new futility stopping summary outputs fromsimBinomialSeasonalExact()(1922429e). - Added regression tests for
simBinomialSeasonalExact()stopping summaries, design-based fixed enrollment defaults, and the rare-eventtoInteger()equal-allocation path (#264). - Expanded
nSurv()andgsSurv()regression tests across the supportedT/minfuptiming combinations for Schoenfeld, Freedman, and Bernstein-Lagakos methods (#270).
gsDesign 3.9.0 (February 2026)
CRAN release: 2026-02-15
Breaking changes
- The R native pipe operator
|>is now used throughout the code and documentation, so R >= 4.1.0 is now required (@nanxstats, #236).
Improvements
- Corrected weighting for stratified time-to-event studies with proportional hazards. This was done for Lachin-Foulkes method, but we also added Bernstein and Lagakos method (@keaven, #243).
-
print.nSurv()andprint.gsSurv()now use refreshed output formatting (@keaven, #243). - C code under
src/is now consistently formatted withclang-format, and C function comments now use Doxygen blocks with clearer parameter and return documentation (@nanxstats, #238). - C normal density calculations now use a shared
gs_inv_sqrt_2piconstant fromsrc/gsDesign.h, which now also has include guards, replacing duplicated magic numbers and repeated division (@nanxstats, #241). - Time-to-event design code is now split into focused
R/gsSurv-*.Rfiles, improving maintainability and future extension without changing user-facing behavior (@nanxstats, #240).
Bug fixes
-
gsBound()now prints the last two lower boundary values correctly in an internal diagnostic message (atemandatem2) whenprinterris enabled (@nanxstats, #238).
Testing
- Added regression tests for
gsBound(),gsBound1(),gsDensity(), andgsProbability()to verify stable behavior after normal density constant refactoring (@nanxstats, #241). - Increased unit test coverage across core gsDesign, spending, and binomial utilities (@keaven, #243).
- Updated
as_gt()snapshots for gt 1.3.0 LaTeX output changes so tests pass reliably across environments (@nanxstats, #239).
gsDesign 3.8.0 (December 2025)
CRAN release: 2025-12-07
New features
-
gsBoundSummary()now displays calendar time forgsNBobjects from the gsDesignNB package when analysis times are provided (@keaven, #229, #233).
Improvements
-
plotgsPower()now useslinewidthinstead of deprecatedsizeaesthetic forgeom_line()calls, avoiding ggplot2 (>= 3.4.0) warnings (@nanxstats, #217).
Bug fixes
-
sfXG3()now correctly reports its name as “Xi-Gallo, method 3” instead of “Xi-Gallo, method 1” (@DMuriuki, #223). - Fixed base plotting for conditional power (
plottype = 4) so labels passed totext()match the plotted points. This prevents r-devel (R 4.6.0) truncation warnings and keeps vdiffr snapshots bitwise reproducible across R versions (@nanxstats, #231).
Testing
- Added independent unit tests for
sfXG1(),sfXG2(), andsfXG3()(@DMuriuki, #223). - Added independent unit tests for
toBinomialExact()andxtable()(@DMuriuki, #224). - Updated
as_gt()snapshot tests for gt 1.1.0 compatibility (@nanxstats, #221). - Snapshot files are now included in the built package to satisfy testthat (>= 3.3.0) requirements (@jdblischak, #227).
- Reduced visual regression test output verbosity by wrapping base graphics plotting expressions in
capture.output()(@nanxstats, #217).
Documentation
-
nNormal()now links tovignette("nNormal")in its See Also section for the full derivation and examples (@keaven, #220).
Maintenance
- Added
workflow_dispatchtrigger toR CMD checkworkflow for easier testing on forks (@jdblischak, #225).
gsDesign 3.7.0 (August 2025)
CRAN release: 2025-08-25
Breaking changes
-
hGraph()has been formally removed from gsDesign (@nanxstats, #215). It was soft-deprecated in gsDesign 3.4.0 and moved to gMCPLite. UsegMCPLite::hGraph()instead.This change also preemptively fixes an
R CMD checkissue with ggplot2 (>= 4.0.0) that would otherwise require declaring MASS as an explicit dependency (tidyverse/ggplot2#6578).
Testing
- Added independent unit tests for
gsAdaptSim()andgsSimulate()(@DMuriuki, #212). - Added independent unit tests for
binomialPowerTable()(@DMuriuki, #214).
gsDesign 3.6.9 (June 2025)
CRAN release: 2025-06-25
Documentation
- Added new vignette
vignette("binomialTwoSample")for binomial two-arm trial design and analysis (@keaven, #202). Covers superiority, non-inferiority, and super-superiority designs using risk-difference methods. Includes sample size calculations, power analysis, and protocol wording with both asymptotic approximations and simulation approaches.
New features
- New function
binomialPowerTable()generates power tables across control rates and treatment effects. Supports both analytical calculations and fast simulation for exact results.
gsDesign 3.6.8 (May 2025)
CRAN release: 2025-05-21
Bug fixes
-
gsBoundSummary()(as updated in gsDesign 3.6.6) did not consider spending time for alternate alpha levels when thealphaargument was specified. This issue has been resolved;lsTimeandusTimeare now correctly used for updated bounds with these alternate alpha levels (@keaven, #203).
Documentation
- Switched the pkgdown math renderer from KaTeX to MathJaX for improved compatibility, as the MathJaX support was improved in pkgdown 2.1.2 (@nanxstats, #200).
- Added Research Organization Registry (ROR) ID to
DESCRIPTION(@jdblischak, #201).
gsDesign 3.6.7 (March 2025)
CRAN release: 2025-03-03
Improvements
- All plots in vignettes are now generated by the native SVG device for sharper appearance and fewer package dependencies (@nanxstats, #188).
Testing
- Add independent unit tests for
toInteger()(@DMuriuki, #186).
gsDesign 3.6.6 (February 2025)
CRAN release: 2025-02-11
New features
-
gsBoundSummary()gains a new argumentalphato assemble a summary table with multiple efficacy boundaries (@keaven, #183).
Testing
- Add essential unit tests for
gsSurvCalendar()(@keaven, #178). - Refactor graphical tests with
vdiffr::expect_doppelganger()(@nanxstats, #176). - Use
CODECOV_TOKENto fix code coverage uploads (@jdblischak, #179).
Documentation
- Add more details to the parameter
rfor controlling numerical integration grid points (@nanxstats, #181).
gsDesign 3.6.5 (November 2024)
CRAN release: 2024-11-14
Improvements
-
toInteger()(introduced in gsDesign 3.5.0) is updated to match broader, non-gsDesign conventions for deriving integer sample size and event counts (@keaven, #172).This update may result in different outputs compared to previous versions. Users who use this function should review the updated function documentation (
?toInteger) andvignette("toInteger")for details.
Documentation
- Add the
cphrole to theAuthors@Rfield following best practices (@nanxstats, #166).
gsDesign 3.6.4 (July 2024)
CRAN release: 2024-07-26
Improvements
We have made the spending function summary output more readable and informative.
- Text summaries for spending functions with multiple parameters are now properly formatted. For instance,
a b = 0.5 1.5is now displayed asa = 0.5, b = 1.5(@jdblischak, #162). - The
summary()method forsfLDOF()no longer includes the redundantnone = 1in its output (@jdblischak, #159).
Documentation
- Added a note about using a positive scalar for
sfuparinsfLDOF()to create a generalized O’Brien-Fleming spending function (@keaven, 52cc711, 99996b). - Improved math rendering in our pkgdown site vignettes by switching to KaTeX, which is now supported in pkgdown 2.1.0 (@nanxstats, #161).
- Standardized vignette titles and headings by using h2 as the base level and adopting sentence case throughout (@nanxstats, #158).
gsDesign 3.6.3 (July 2024)
CRAN release: 2024-07-09
New features
- Implemented conditional error spending functions
sfXG1(),sfXG2(), andsfXG3()based on Xi and Gallo (2019). Seevignette("ConditionalErrorSpending")for details and reproduced examples from the literature (@keaven, #147. Thanks, @xidongdxi, for comments on vignette).
Testing
- Added independent testing for
gsSurvCalendar()(@myeongjong, #144). - Expanded test coverage for
gsBinomialExact()(@menglu2, #143).
gsDesign 3.6.2 (April 2024)
CRAN release: 2024-04-09
Documentation
- Add new vignette on conditional power and conditional error, see
vignette("ConditionalPowerPlot")(beb2957, 727fe20, 57394fe). - Fix roxygen2 warning and use magrittr pipes in vignette for consistency (#131).
Testing
- Move independently programmed functions for validation as standard test helper files (#130).
gsDesign 3.6.1 (February 2024)
CRAN release: 2024-02-13
New features
-
gsBoundSummary()now has theas_rtf()method implemented to generate RTF outputs for bound summary tables (@wangben718, #107). -
plotgsPower()gets new argumentsoffsetandtitleAnalysisLegendto enable more flexible and accurate power plots (plottype = 2) (@jdblischak, #121, #123).
Improvements
- The plotting functions now use
dplyr::reframe()to replacedplyr::summarize()when performing groupedcumsum()(@jdblischak, #114). - The plotting functions are updated to use the
.datapronoun from rlang withggplot2::aes(). This simplifies the code and follows the recommended practice when using ggplot2 in packages (@jdblischak, #124). -
hGraph()now uses namedguideargument in thescale_fill_manual()call to be compatible with ggplot2 3.5.0 (@teunbrand, #115). Note: this function has been deprecated and moved to gMCPLite since gsDesign 3.4.0. It will be removed from gsDesign in a future version. Please usegMCPLite::hGraph()instead.
gsDesign 3.6.0 (November 2023)
CRAN release: 2023-11-12
New features
-
gsSurvCalendar()function added to enable group sequential design for time-to-event outcomes using calendar timing of interim analysis specification (#105). -
as_rtf()method forgsBinomialExact()objects added, enable RTF table outputs for standard word processing software (#102).
Improvements
-
toBinomialExact()andgsBinomialExact(): fix error checking in bound computations, improve documentation and error messages (#105). -
print.gsSurv(): Improve the display of targeted events (very minor). The boundary crossing probability computations did not change. The need is made evident by the addition of thetoInteger()function (#105). -
toInteger(): Fix the documentation and execution based on theratioargument (#105). - Update the vaccine efficacy, Poisson mixture model, and toInteger vignettes (#105).
- Standardize and improve roxygen2 documentation (#104).
gsDesign 3.5.0 (July 2023)
CRAN release: 2023-07-19
-
sfPower()now allows a wider parameter range (0, 15]. -
toInteger()function added to convertgsDesignorgsSurvclasses to integer sample size and event counts. -
toBinomialExact()function added to convert time-to-event bounds to exact binomial for low event rate studies. - Added “A Gentle Introduction to Group Sequential Design” vignette for an introduction to asymptotics for group sequential design.
-
as_table()andas_gt()methods forgsBinomialExactobjects added, as described in the new “Binomial SPRT” vignette. - In
plot.ssrCP(), thehatsyntax in the mathematical expression is revised, resolving labeling issues. -
ggplot2::qplot()usage replaced due to its deprecation in ggplot2 3.4.0. - Link update for the gsDesign manual in the documentation, now directly pointing to the gsDesign technical manual bookdown project.
- Introduced a new hex sticker logo.
gsDesign 3.3.0 (May 2022)
CRAN release: 2022-05-27
- Addition of vignettes
- Demonstrate cure model and calendar-based analysis timing for time-to-event endpoint design
- Vaccine efficacy design using spending bounds and exact binomial boundary crossing probabilities
- Minor fix to labeling in print.gsProbability
- Fixed error in sfStep
- Updates to reduce R CMD check and other minor issues
gsDesign 3.2.2 (January 2022)
CRAN release: 2022-02-02
- Use
inherits()instead ofis()to determine if an object is an instance of a class, when appropriate - Correctly close graphics device in unit tests to avoid plot output file not found issues
- Minor fixes to hGraph() for multiplicity graphs
- Minor fix to nBinomial() when odds-ratio scale specified to resolve user issue
- Minor changes to vignettes
gsDesign 3.2.1 (July 2021)
CRAN release: 2021-07-12
- Changed gt package usage in a vignette due to deprecated gt function
- Replied to minor comments from CRAN reviewer (no functionality impact)
- Minor update to DESCRIPTION citing Jennison and Turnbull reference
gsDesign 3.2.0 (January 2021)
CRAN release: 2021-03-13
- Substantially updated unit testing to increase code coverage above 80%
- Updated error checking messages to print function where check fails
- Removed dependencies on plyr packages
- Updated github actions
gsDesign 3.1.1 (May 2020)
CRAN release: 2020-05-07
- Vignettes updated
- Added
hGraph()to support ggplot2 versions of multiplicity graphs - Eliminated unnecessary check from
sequentialPValue - Targeted release to CRAN
- Removed dependencies on reshape2, plyr
- Updated continuous integration
- Updated license
gsDesign 3.1.0 (April 2019)
- Addition of pkgdown web site
- Updated unit testing to from RUnit to testthat
- Converted to roxygen2 generation of help files
- Converted vignettes to R Markdown
- Added Travis-CI and Appveyor support
- Added
sequentialPValuefunction - Backwards compatible addition of spending time capabilities to
gsDesignandgsSurv
gsDesign 3.0-5 (January 2018)
- Registered C routines
- Fixed “gsbound”
- Replaced “array” by “rep” calls to avoid
R CMD checkwarnings
gsDesign 3.0-4 (September 2017)
- First Github-based release
- Cleaned up documentation for
nBinomial1Sample() - Updated documentation and code (including one default value for an argument) for
nBinomial1Sample()to improve error handling and clarity - Updated
sfLDOF()to generalize with rho parameter; still backwards compatible for Lan-DeMets O’Brien-Fleming
gsDesign 3.0-3
- Introduced spending time as a separate concept from information time to enable concepts such as calendar-based spending functions. The only user function changed is the
gsDesign()function and the change is the addition of the parametersusTimeandlsTime; default behavior is backwards compatible.
gsDesign 3.0-2 (February 2016)
- Simplified conditional power section of gsDesignManual.pdf in doc directory
- Corrected basic calculation in
gsCP() - Eliminated deprecated ggplot2 function
opts()
gsDesign 3.0-1 (January 2016)
CRAN release: 2016-02-01
- More changes to comply with R standards (in NAMESPACE -
importFromstatements - and DESCRIPTION - adding plyr to imports) ensuring appropriate references. - Deleted link in documentation that no longer exists (gsBinomialExact.Rd).
- Last planned RForge-based release; moving to Github.
gsDesign 3.0-0 (December 2015)
- Updated xtable extension to meet R standards for extensions.
- Fixed
xtable.gsSurvandprint.gsSurvto work with 1-sided designs - Update to calls to ggplot to replace show_guide (deprecated) with
show.legendarguments where used inggplot2::geom_textcalls; no user impact - Minor typo fixed in
sfLogistichelp file - Cleaned up “imports” and “depends” in an effort to be an R “good citizen”
- Registered S3 methods in NAMESPACE
gsDesign 2.9-3 (November 2014)
CRAN release: 2014-11-10
- Added
sfTrimmedas likely preferred spending function approach to skipping early or all interim efficacy analyses; this also can adjust bound when final analysis is performed with less than maximum planned information. Updatedhelp(sfTrimmed)to demonstrate these capabilities. - Added
sfGapped, which is primarily intended to eliminate futility analyses later in a study; seehelp(sfGapped)for an example - Added
summary.spendfn()to provide textual summary of spending functions; this simplified the print function for gsDesign objects - Added
sfStep()which can be used to set an interim spend when the exact amount of information is unknown; an example of how this can be misused is provided in the help file - Fixed rounding so that
gsBoundSummary,xtable.gsSurvandsummary.gsDesignare consistent forgsSurvobjects
