Skip to content

Conversation

@LittleBeannie
Copy link
Collaborator

@LittleBeannie LittleBeannie commented Feb 4, 2026

To solve issue #606

Copy link
Collaborator

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

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

Overall looks good.

A big picture question (that doesn't have to be addressed for this PR): when is an example long enough that a vignette would be the better option?

#' # After the delayed effect, the HR is 0.8 for stratum A and 0.5 for stratum B.
#' fail_rate <- define_fail_rate(stratum = c("A", "A", "B", "B"),
#' duration = c(3, Inf, 3, Inf),
#' fail_rate = log(2) / c(9, 9, 9, 15),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it deserve a comment why the failure rate is different only for stratum B after the delayed effect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your suggestions. These are really nice comments!

When is an example long enough that a vignette would be the better option?

The vignettes are typically more narrative-driven, which is the style Keaven prefers.
Although this example is lengthy, its primary focus is on demonstrating implementation rather than telling a complex story. Therefore, let's categorize it as an "example" for now, not a full vignette.

Does it deserve a comment why the failure rate is different only for stratum B after the delayed effect?

You identified the key consideration here! Typically, the median of the control arm is assumed to be constant. However, in some scenarios, it can be modeled as time-varying. This example demostrates that gsDesign2 is able to do time-varying median. Since the primary goal is for users to adapt the code and input their own study-specific parameters, the current example is sufficient.

@LittleBeannie LittleBeannie merged commit 4413a7e into main Feb 10, 2026
7 checks passed
@LittleBeannie LittleBeannie deleted the 606-blinded-estimation-of-the-treatment-effect-under-stratified-design branch February 10, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blinded estimation of the treatment effect under stratified design

2 participants