Skip to content

Add Dunnett-type 4-dose GSD vignette and bump version to 0.3.0#52

Open
keaven wants to merge 19 commits intomainfrom
46-s7-change-generate_corr-to-s7
Open

Add Dunnett-type 4-dose GSD vignette and bump version to 0.3.0#52
keaven wants to merge 19 commits intomainfrom
46-s7-change-generate_corr-to-s7

Conversation

@keaven
Copy link
Copy Markdown
Collaborator

@keaven keaven commented Apr 29, 2026

Summary

This PR adds a new vignette demonstrating the WPGSD methodology for a Dunnett-type dose-finding trial and bumps the package version to 0.3.0.

New Vignette: Dunnett-type dose-finding with group sequential design

Demonstrates the WPGSD approach for a trial with 4 experimental dose groups vs. a common control with:

  • Endpoint: Overall Survival (OS)
  • Multiplicity: Equal weights (1/4), equal transitions (1/3) among dose arms
  • Group sequential design: Interim analysis at ~40% information fraction
  • Futility: Common non-binding futility bound via gsDesign (HSD beta-spending)
  • Efficacy: WPGSD Type 3 (separate alpha spending) with Lan-DeMets O'Brien-Fleming, compared to Bonferroni
  • Closed testing: Full closed testing procedure with hypothetical observed p-values

Key results

  • Correlation matrix (8x8) verified against manual computation for all 5 cases
  • Correlations of ~0.50 between dose-vs-control comparisons at same analysis (shared control arm)
  • WPGSD bounds are meaningfully less conservative than Bonferroni bounds
  • generate_corr() handles 4+ hypotheses correctly with no code changes needed

Other changes

  • Version bump: 0.2.0 -> 0.3.0
  • Bibliography: Added Dunnett (1955) reference to wpgsd.bib

keaven and others added 13 commits August 29, 2025 17:19
- Add EventTable and CorrelationMatrix S7 classes with type safety and validation
- Implement generate_corr_s7() with EventTable input and proper column ordering
- Update vignettes with S7 examples and improved math typesetting
- Reorganize pkgdown reference documentation for better discoverability
- Maintain full backward compatibility with existing functions
- Add comprehensive test suite (105+ tests) covering all S7 functionality
- Update NEWS.md with detailed release notes for v0.2.0
…trix

- Add S7 class system for enhanced type safety and validation
- Implement EventTable S7 class with comprehensive data validation
- Implement CorrelationMatrix S7 class with mathematical constraints
- Add generate_corr_s7() function with EventTable input and proper column ordering
- Add S7 constructors, converters, and utility functions
- Update vignettes with S7 examples and improved math formatting
- Reorganize pkgdown reference documentation with logical groupings
- Maintain full backward compatibility with existing functions
- Add comprehensive test suite (105+ tests)
- Update NEWS.md with detailed release notes
- Fixed correlation matrix symmetry validation tolerance (1e-12 with check.attributes=FALSE)
- Removed non-ASCII character from print method (× to x)
- Renamed non-portable filename: s7 prompts.md -> s7_prompts.md
- Added missing @export for generate_event_table_cc function
- Added EventTable to package exports
- Simplified roxygen documentation to avoid parsing issues
- All 132 unit tests passing
- Package builds and installs successfully
- pkgdown documentation site updated
- Implement complete S7 class system with EventTable and CorrelationMatrix classes
- Add robust validation for correlation matrices and event data
- Fix correlation matrix validation tolerance issues (1e-12 precision)
- Resolve non-ASCII character issues in documentation
- Add missing @export tags for proper function exports
- Significantly improve adj-seq-p vignette with 80% code reduction
- Add systematic helper functions for better maintainability
- Enhanced mathematical notation and multiplicity strategy visualization
- Add comprehensive citations and improved explanations
- Update NEWS.md with detailed changelog for v0.2.0
- All 132 tests passing with enhanced test coverage
- Complete documentation and pkgdown site generation
Add blank line before bullet points for better readability in adj-seq-p vignette
…ring

- Remove redundant wrapper functions new_event_table() and new_correlation_matrix()
- Enhance S7 class documentation with comprehensive parameter descriptions
- Consolidate validation logic into validate_event_data_core() eliminating ~80% duplication
- Update all examples, tests, and documentation to use direct S7 constructors
- Relax Event validation to allow non-integer values while maintaining H1/H2/Analysis as integers
- Regenerate package documentation and fix NAMESPACE exports
- Update pkgdown configuration to reflect API changes
- Add comprehensive NEWS.md documentation for v0.2.0 changes

Improves code maintainability and follows S7 best practices for class documentation.
…ITLE in navigation

- Deleted empty vignettes/adj-seq-p-simplified.Rmd file (0 bytes)
- Removed corresponding docs/articles/adj-seq-p-simplified.html
- Rebuilt pkgdown site to fix navigation dropdown
- Resolves UNKNOWN TITLE issue in Articles menu
- Added structured reference sections to _pkgdown.yml:
  * S7 Classes and Constructors
  * Event Table Generation
  * Correlation Matrix Computation
  * Statistical Testing and Analysis
  * Data Manipulation and Subsetting
  * Data Validation
  * Utility Functions
  * Package Information
- Improves user experience by grouping related functions together
- Reference documentation now displays functions in logical categories
@keaven keaven linked an issue Apr 29, 2026 that may be closed by this pull request
keaven and others added 2 commits April 29, 2026 20:44
- Fix validator to allow single-analysis/hypothesis EventTables
- Guard floor() calls with is.numeric checks
- Fix paste/paste0 inconsistency in error messages
- Correct test expectations to match actual error messages
- Add NEWS.md entry for v0.3.0
@nanxstats
Copy link
Copy Markdown
Contributor

Here is a prompt you can use to clean things up:

1. Remove these committed files/directories and commit:

- ..Rcheck/
- wpgsd.Rcheck/
- wpgsd_0.1.0.tar.gz
- wpgsd_0.2.0.tar.gz
- vignettes/adj-seq-p.html

2. Then, add appropriate rules to .gitignore to prevent them from being accidentally committed in the future, for example:

```
# Output files from R CMD check
/*.Rcheck/

# Output files from R CMD build
/*.tar.gz

# produced vignettes
vignettes/*.html
vignettes/*.pdf
```

3. Find canonical format and locations (tests, vignettes, etc.) within R packages to place the content of these files and remove them from the current location:

- examples/*.R
- EventTable_README.md

4. Use hyphens `-` as separator in vignette file names consistently (tidyverse package convention) so the rendered HTML pages have canonical clean URLs.

keaven and others added 3 commits April 30, 2026 06:56
- Fix duplicate/merged roxygen blocks in s7_classes.R and compute_correlations.R
- Add @name tags for S7 class definitions (EventTable, CorrelationMatrix)
- Separate @importFrom block from EventTable roxygen with NULL
- Remove orphaned validate_event_data_core roxygen block from s7_classes.R
- Fix stray backtick in @param event in generate_event_table_.R and generate_event_ol.R
- Fix EventTable example data to be valid (complete event table)
- Regenerate all affected Rd files
@keaven keaven requested a review from Copilot April 30, 2026 14:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@keaven keaven requested review from LittleBeannie and Copilot April 30, 2026 14:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

- Fix within-hypothesis and between-hypotheses correlation loops in
  generate_corr() to correctly enumerate all analysis pairs when K>2
- Add test for generate_corr() with 2 hypotheses and 3 analyses
- Rewrite Dunnett vignette: 2 doses / 3 analyses (2 interims + final)
  instead of 4 doses / 2 analyses, exercising full K>2 generality
- Update NEWS.md with bug fix and vignette changes
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.

s7: change generate_corr to s7

3 participants