Skip to content

Update nSurv and gsSurv to support Schoenfeld method + test coverage improvements#243

Merged
keaven merged 5 commits intomasterfrom
gssurv-schoenfeld
Feb 9, 2026
Merged

Update nSurv and gsSurv to support Schoenfeld method + test coverage improvements#243
keaven merged 5 commits intomasterfrom
gssurv-schoenfeld

Conversation

@nanxstats
Copy link
Copy Markdown
Collaborator

@nanxstats nanxstats commented Feb 9, 2026

Closes #194

This PR ports the work from the issue-194 branch (which was ported from the gsSurv Quarto book repo) to have a minimal diff. This mostly involves cherry-picking gsSurv/nSurv survival design updates and related method/docs updates + porting patched tests and new developer coverage tests.

  • Updated nSurv() and gsSurv() to incorporate Schoenfeld and Freedman methods for sample size and power for time-to-event studies with proportional hazards. This allows matching versus other software.
  • 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.
  • Refreshed print.nSurv()/print.gsSurv() output formatting.
  • Increased unit test coverage across core gsDesign, spending, and binomial utilities.
  • Updated benchmark baseline .cywx files to match current outputs.

@nanxstats nanxstats requested a review from keaven February 9, 2026 04:36
@keaven keaven self-assigned this Feb 9, 2026
@keaven keaven merged commit 9770b17 into master Feb 9, 2026
8 checks passed
@keaven
Copy link
Copy Markdown
Owner

keaven commented Feb 9, 2026

Need update to test.type text strings; I will do this.
3 = "Two-sided asymmetric with binding futility bound"
5 = "Two-sided asymmetric with binding harm bound"
6 = "Two-sided asymmetric with non-binding harm bound"

@nanxstats nanxstats deleted the gssurv-schoenfeld branch February 9, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add nSurv and gsSurv option to use Schoenfeld method for sample size and event counts

2 participants