gsDesignNB: Sample Size and Simulation for Negative Binomial Outcomes

Provides tools for planning and simulating recurrent event trials with overdispersed count endpoints analyzed using negative binomial (or Poisson) rate models. Implements sample size and power calculations for fixed designs with variable accrual, dropout, maximum follow-up, and event gaps, including methods of Zhu and Lakkis (2014) <doi:10.1002/sim.5947> and Friede and Schmidli (2010) <doi:10.3414/ME09-02-0060> as well as extensions for score-test sizing and gaps between events. Supports group sequential monitoring by building on the 'gsDesign' package. Includes recurrent-event simulation utilities (including seasonal rates), interim data truncation, Wald and score-test inference for rate ratios, and information estimation and sample size re-estimation with or without treatment-group labels.

Version: 0.3.2
Depends: R (≥ 4.1.0)
Imports: data.table, gsDesign (≥ 3.10.0), simtrial, stats, MASS
Suggests: glmmTMB, httpuv, testthat (≥ 3.0.0), knitr, rmarkdown, ggplot2, dplyr, gt, scales, shiny, foreach, doFuture, future, future.apply, gridExtra
Published: 2026-07-06
DOI: 10.32614/CRAN.package.gsDesignNB
Author: Keaven Anderson [aut, cre], Hongtao Zhang [aut], Andrea Maes [aut], Nan Xiao [ctb], Merck & Co., Inc., Rahway, NJ, USA and its affiliates ROR ID [cph]
Maintainer: Keaven Anderson <keaven_anderson at merck.com>
BugReports: https://github.com/keaven/gsDesignNB/issues
License: GPL (≥ 3)
URL: https://keaven.github.io/gsDesignNB/, https://github.com/keaven/gsDesignNB
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: gsDesignNB results

Documentation:

Reference manual: gsDesignNB.html , gsDesignNB.pdf
Vignettes: AI-assisted gsDesignNB workflows (source, R code)
Diagnosing Blinded Information Calculation Issues (source, R code)
Group sequential simulation with completers analysis (source, R code)
Group sequential design and simulation (source, R code)
Multiple imputation for longitudinal negative binomial counts (source, R code)
Non-inferiority and super-superiority designs (source, R code)
Sample size calculation for negative binomial outcomes (source, R code)
Published sample-size examples with the gsDesignNB AI skill (source, R code)
Score vs Wald tests and sample-size recommendations (source, R code)
Seasonal event simulation (source, R code)
Simulation of recurrent events (source, R code)
Sample size re-estimation example (source, R code)
SSR simulation study (source, R code)
Verification of sample size calculation via simulation (source, R code)

Downloads:

Package source: gsDesignNB_0.3.2.tar.gz
Windows binaries: r-devel: gsDesignNB_0.2.6.zip, r-release: gsDesignNB_0.3.2.zip, r-oldrel: gsDesignNB_0.2.6.zip
macOS binaries: r-release (arm64): gsDesignNB_0.3.2.tgz, r-oldrel (arm64): gsDesignNB_0.3.2.tgz, r-release (x86_64): gsDesignNB_0.3.2.tgz, r-oldrel (x86_64): gsDesignNB_0.3.2.tgz
Old sources: gsDesignNB archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=gsDesignNB to link to this page.