Package: gsDesign 3.10.0.9000

gsDesign: Group Sequential Design

Derives group sequential clinical trial designs and describes their properties. Particular focus on time-to-event, binary, and continuous outcomes. Largely based on methods described in Jennison, Christopher and Turnbull, Bruce W., 2000, "Group Sequential Methods with Applications to Clinical Trials" ISBN: 0-8493-0316-8.

Authors:Keaven Anderson [aut, cre], Merck & Co., Inc., Rahway, NJ, USA and its affiliates [cph]

gsDesign_3.10.0.9000.tar.gz
gsDesign_3.10.0.9000.zip(r-4.7)gsDesign_3.10.0.9000.zip(r-4.6)gsDesign_3.10.0.9000.zip(r-4.5)
gsDesign_3.10.0.9000.tgz(r-4.6-x86_64)gsDesign_3.10.0.9000.tgz(r-4.6-arm64)gsDesign_3.10.0.9000.tgz(r-4.5-x86_64)gsDesign_3.10.0.9000.tgz(r-4.5-arm64)
gsDesign_3.10.0.9000.tar.gz(r-4.7-arm64)gsDesign_3.10.0.9000.tar.gz(r-4.7-x86_64)gsDesign_3.10.0.9000.tar.gz(r-4.6-arm64)gsDesign_3.10.0.9000.tar.gz(r-4.6-x86_64)
gsDesign_3.10.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
gsDesign/json (API)

# Install 'gsDesign' in R:
install.packages('gsDesign', repos = c('https://keaven.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/keaven/gsdesign/issues

Pkgdown/docs site:https://keaven.github.io

On CRAN:

Conda:

biostatisticsboundariesclinical-trialsdesignspending-functions

14.28 score 56 stars 9 packages 654 scripts 6.5k downloads 13 mentions 85 exports 66 dependencies

Last updated from:67a3a74b2a. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK293
linux-devel-x86_64OK310
source / vignettesOK363
linux-release-arm64OK285
linux-release-x86_64OK300
macos-release-arm64OK155
macos-release-x86_64OK467
macos-oldrel-arm64OK243
macos-oldrel-x86_64OK358
windows-develOK353
windows-releaseOK308
windows-oldrelOK319
wasm-releaseOK168

Exports:as_gtas_rtfas_tablebinomialPowerTablebinomialSPRTcheckLengthscheckRangecheckScalarcheckVectorciBinomialcondPowereEventsgsBinomialExactgsBoundgsBound1gsBoundCPgsBoundSummarygsBValuegsCPgsCPOSgsCPzgsDeltagsDensitygsDesigngsHRgsPIgsPOSgsPosteriorgsPPgsProbabilitygsRRgsSurvgsSurvCalendargsSurvPowerhrn2zhrz2nisIntegernBinomialnBinomial1SamplenEventsnEventsIAnNormalnormalGridnSurvnSurvivalPower.ssrCPrepeatedPValueBinomialExactsequentialPValuesequentialPValueBinomialExactsfBetaDistsfCauchysfExponentialsfExtremeValuesfExtremeValue2sfGappedsfHSDsfLDOFsfLDPococksfLinearsfLogisticsfNormalsfPointssfPowersfStepsfTDistsfTrimmedsfTruncatedsfXG1sfXG2sfXG3simBinomialsimBinomialSeasonalExactspendingFunctionssrCPtestBinomialtEventsIAtoBinomialExacttoIntegervarBinomialxprintxtablez2Fisherz2NCz2Zzn2hr

Dependencies:base64encbigDbitopsbslibcachemclicommonmarkcpp11curldigestdplyrevaluatefarverfastmapfontawesomefsgenericsggplot2gluegtgtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclelitedownmagrittrmarkdownmemoisemimepillarpkgconfigpurrrr2rtfR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownS7sassscalesstringistringrtibbletidyrtidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2xtableyaml

Basic time-to-event group sequential design using gsSurv
Introduction | Fixed design derivation | Outcome and dropout distributions | Enrollment and trial duration | Deriving design with no interim analyses | Varying enrollment duration to power trial | Group sequential design | Additional parameters | Generating the design | Textual summary | Tabular summaries | Summary plots | Update bounds at time of analysis | Evaluating interim results | References

Last update: 2026-06-23
Started: 2020-04-23

Overview of survival endpoint design
Introduction | Schoenfeld approximation support | Power and sample size with nEvents() | Group sequential design | Information based design | Approximating boundary characteristics | Examples | Lachin and Foulkes design | Model assumptions | Fixed design | Plotting | Event accrual | References

Last update: 2026-06-23
Started: 2020-04-23

Power Computation for Group Sequential Survival Designs
Motivation | Quick start | How gsSurvPower uses your inputs | Hazard ratio roles | Analysis timing: calendar time vs. event-driven | Quick decision guide | Spending and method | Stratified targetEvents | Power under alternative assumptions | Power under a different hazard ratio | Power over a range of hazard ratios | Multiple timing criteria | Setup | Baseline: design assumptions | Scenario 1: slower enrollment | Scenario 2: higher control failure rate | Controlling spending with informationRates | Comparison with gsDesign power plots | Bounds stability | Changing alpha | Binding type example (test.type = 3) | Example: event-based timing | Example: slower enrollment at fixed analysis times | Example: calendar-based spending | Example: stratified event targets | Example: biomarker subgroup to stratified design | Step 1: Design for the biomarker-positive subgroup | Step 2: Power for the overall (stratified) population

Last update: 2026-06-23
Started: 2026-03-26

Reproducing SAS PROC SEQDESIGN survival designs in gsDesign
Overview | Starting point: SAS PROC SEQDESIGN survival example | Key differences: SAS SEQDESIGN vs. R gsDesign | 1. Event formula | 2. Alpha handling in gsDesign() and gsSurv() | 3. Accrual duration and follow-up time | Reproducing the fractional-time design with gsSurv() | gsSurv() with aligned parameters | References

Last update: 2026-06-23
Started: 2026-05-25

Integer sample size and event counts
Introduction | Summary of method | Binomial endpoint designs | Fixed sample size | 1-sided design | Non-binding design | Time-to-event endpoint designs | Seasonal design with a final zero event-rate period | References

Last update: 2026-06-03
Started: 2023-07-18

Multi-season studies for rare events
Introduction | Assumptions and parameterization | Initial group sequential setup | Example repeated and sequential p-values | Update exact bounds at analysis time | Lightweight runnable simulation | Example with lower-than-planned event rates | Larger offline runs (template) | Notes and extensions | References

Last update: 2026-06-03
Started: 2026-05-09

Vaccine efficacy trial design
Introduction | Parameterization | Exact binomial approach | The time-to-event approach | Generating a design | The time-to-event design | Converting to an exact binomial design | Combined summary table | Checking design properties | $\alpha$-spending | $\beta$-spending | Bound update at time of analysis for example 2 | Summary | References

Last update: 2026-06-03
Started: 2022-05-16

Selective bound testing at interim analyses
Introduction | Parameters | Example 1: Futility testing only at the first interim | Plotting | Example 2: No efficacy testing at the first interim | Example 3: Survival design with selective bounds via gsSurv | Example 4: Selective harm monitoring (test.type 7/8) | Example 5: Combining selective efficacy and futility | Validation rules | Accessing stored flags | Type I Error Preservation | How it works | Non-binding futility (test.type 4 or 6) | Binding futility (test.type 3 or 5)

Last update: 2026-03-01
Started: 2026-03-01

Futility and harm bounds for overall survival monitoring
Introduction | Regulatory context: FDA guidance on OS monitoring in oncology | Design framework overview | Design with non-binding bounds (test.type = 8) | Spending function specification | Summary | Detailed boundary table | Interpreting the boundaries | Boundary crossing probabilities | Visualization | Z-value boundaries | Approximate treatment effect at boundaries | Conditional power at boundaries | Spending function plot | B-values at boundaries | Design with binding bounds (test.type = 7) | Comparing binding and non-binding | Efficacy bounds at alternate $\alpha$ levels | Practical considerations | Choice of spending functions | Interpreting the harm bound | Harm bound capping | When to use test.type = 7 vs. test.type = 8 | Why a separate "binding harm / non-binding futility" option is unnecessary | Adjusting the boundaries | References

Last update: 2026-02-28
Started: 2026-02-23

A cure model calendar-based design
Introduction | The Poisson mixture model | Supporting functions | Scenario assumptions | Examples | Event accumulation | Study design | Design assumptions | Study design and event accumulation | Considerations | References

Last update: 2026-01-08
Started: 2022-05-16

Binomial SPRT
Overview | Response rate example | Summarizing design properties | Safety monitoring example | Summary | References

Last update: 2026-01-08
Started: 2023-04-08

Binomial two arm trial design and analysis
Overview and notation | Sample size | Testing and confidence intervals | Non-inferiority and super-superiority | Simulation | Power table | Summary | References

Last update: 2026-01-08
Started: 2025-06-25

Conditional error spending functions
Introduction | Implementation in gsDesign | Method 1 | Method 2 | Method 3 | Replicating published examples | Summary | References

Last update: 2026-01-08
Started: 2024-07-08

Conditional power and conditional error
Introduction | Design | Update design at time of interim analysis | Testing and conditional power | Predictive power | References

Last update: 2026-01-08
Started: 2024-03-26

Two-sample normal sample size
Introduction | The problem considered | Sample size | Examples | Power | Verification with simulation | Group sequential design | References

Last update: 2026-01-08
Started: 2020-04-23

A gentle introduction to group sequential design
Introduction | Group sequential design framework | Bounds for testing | One-sided testing | Asymmetric two-sided testing | Spending function design | References

Last update: 2025-03-04
Started: 2023-07-18

gsDesign package overview
Introduction | Example | References

Last update: 2025-03-04
Started: 2023-09-06

Spending function overview
Introduction | Examples | References

Last update: 2025-03-04
Started: 2023-09-06

Graphical testing for group sequential design

Last update: 2022-10-11
Started: 2022-05-16

Multiplicity graphs

Last update: 2022-10-11
Started: 2020-04-23

Readme and manuals

Help Manual

Help pageTopics
Convert a summary table object to a gt objectas_gt as_gt.gsBinomialExactTable
Save a summary table object as an RTF fileas_rtf as_rtf.gsBinomialExactTable as_rtf.gsBoundSummary
Create a summary tableas_table as_table.gsBinomialExact
Power Table for Binomial TestsbinomialPowerTable
Utility functions to verify variable propertiescheckLengths checkRange checkScalar checkVector isInteger
Testing, Confidence Intervals, Sample Size and Power for Comparing Two Binomial RatesciBinomial nBinomial simBinomial testBinomial varBinomial
Sample size re-estimation based on conditional powercondPower plot.ssrCP Power.ssrCP ssrCP z2Fisher z2NC z2Z
Expected number of events for a time-to-event studyeEvents print.eEvents
One-Sample Binomial RoutinesbinomialSPRT gsBinomialExact nBinomial1Sample plot.binomialSPRT plot.gsBinomialExact print.gsBinomialExact
Boundary derivation - low levelgsBound gsBound1
Conditional Power at Interim BoundariesgsBoundCP
Conditional and Predictive Power, Overall and Conditional Probability of SuccessgsCP gsCPOS gsPI gsPOS gsPosterior gsPP
Group sequential design interim density functiongsDensity
Design DerivationgsDesign xtable.gsDesign
Boundary Crossing ProbabilitiesgsProbability print.gsProbability
Group sequential design with calendar-based timing of analysesgsSurvCalendar
Compute power for a group sequential survival designgsSurvPower
Normal distribution sample size (2-sample)nNormal
Normal Density GridnormalGrid
Plots for group sequential designsplot.gsDesign plot.gsProbability
Time-to-event sample size calculation (Lachin-Foulkes)hrn2z hrz2n nEvents nSurvival print.nSurvival zn2hr
Exact binomial repeated p-values for a group sequential designrepeatedPValueBinomialExact
Sequential p-value computationsequentialPValue
Exact binomial sequential p-value for a group sequential designsequentialPValueBinomialExact
Exponential Spending FunctionsfExponential
Hwang-Shih-DeCani Spending FunctionsfHSD
Lan-DeMets Spending function overviewsfLDOF sfLDPocock
Piecewise Linear and Step Function Spending FunctionssfLinear sfStep
Two-parameter Spending Function FamiliessfBetaDist sfCauchy sfExtremeValue sfExtremeValue2 sfLogistic sfNormal
Pointwise Spending FunctionsfPoints
Kim-DeMets (power) Spending FunctionsfPower
t-distribution Spending FunctionsfTDist
Truncated, trimmed and gapped spending functionssfGapped sfTrimmed sfTruncated
Xi and Gallo conditional error spending functionssfXG sfXG1 sfXG2 sfXG3
Simulate exact-binomial seasonal monitoring scenariossimBinomialSeasonalExact
Bound Summary and Z-transformationsgsBoundSummary gsBValue gsCPz gsDelta gsHR gsRR print.gsBoundSummary print.gsDesign summary.gsDesign xprint
Spending FunctionspendingFunction summary.spendfn
Advanced time-to-event sample size calculationgsSurv nEventsIA nSurv print.gsSurv print.nSurv tEventsIA xtable.gsSurv
Translate survival design bounds to exact binomial boundstoBinomialExact
Translate group sequential design to integer events (survival designs) or sample size (other designs)toInteger
xtablextable