-
Notifications
You must be signed in to change notification settings - Fork 9
Add an example showing how to update a stratified design at the time analysis #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example showing how to update a stratified design at the time analysis #608
Conversation
jdblischak
left a comment
There was a problem hiding this 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), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
To solve issue #606