Skip to content

Conversation

@LittleBeannie
Copy link
Collaborator

@LittleBeannie LittleBeannie commented May 23, 2025

To solve issue #547.

@LittleBeannie LittleBeannie requested a review from keaven May 28, 2025 15:07
LittleBeannie and others added 5 commits October 15, 2025 14:33
2. clean up the comments
3. fixed the details braces issue
4. update the beta the last upper bound, which should be the futility bound from a, not b
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.

Just a few suggestions for improvements. Overall this looks good. I like the developer tests.

Also, with 28 commits made over multiple months, this PR is a good candidate for the "Squash and Merge" feature. Having a single commit for the implementation of gs_cp_npe2() makes future troubleshooting easier

info = NULL,
a = NULL,
b = NULL,
c = NULL){
Copy link
Collaborator

Choose a reason for hiding this comment

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

These variable names are very short for a function that is exposed to end users. Are these single letters easily recognizable to practitioners, eg from a well-known formula?

If not, I would recommend giving them more informative names. You can always re-assign them to shorter names inside the function if this aids the readability of the code.

prob_alpha_plus <- rep(0, n_future_analysis)
prob_beta <- rep(0, n_future_analysis)

for(x in 1:n_future_analysis){
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend using seq_len() here as you do below

# vector of length x
# ------------------------------ #

mu <- sapply(seq_len(x), function(k){
Copy link
Collaborator

Choose a reason for hiding this comment

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

vapply() is safer to use inside of a function

Connecting with my comment above about the variable names. If you converted this anonymous function to a named function, you could name its argument as t and then pass the longer variable name to it.

# ----------------------------------- #
ans <- list()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this unnecessary whitespace

\begin{table}[t]
\caption*{
{\large Fixed Design under AHR Method\textsuperscript{\textit{1}}}
{\fontsize{20}{25}\selectfont Fixed Design under AHR Method\textsuperscript{\textit{1}}\fontsize{12}{15}\selectfont }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these changes to the snapshot test still needed now that #589 was merged?

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.

Develop gs_cp for general CP and gs_cp_simple for simple CP

4 participants