Skip to content
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

Allow multiple alpha levels to gsBoundSummary table. #180

Open
16 tasks
keaven opened this issue Jan 26, 2025 · 0 comments
Open
16 tasks

Allow multiple alpha levels to gsBoundSummary table. #180

keaven opened this issue Jan 26, 2025 · 0 comments
Assignees

Comments

@keaven
Copy link
Owner

keaven commented Jan 26, 2025

Will attempt an AI version that does multiple calls to gsDesign and assembles a summary table with multiple efficacy boundaries. At most a single futility bound will be provided except for 2-sided designs.

  1. Rename current gsBoundSummary() function as gsBoundSummary0() and make the latter an internal function
  2. Argument list for new gsBoundSummary will be the same as the current version, but adding a vector a vector of alpha-levels in a new argument called alpha
  3. Check that input alpha is NULL or that levels are > 0 and < 1 - x$beta.
  4. Call out <- gsBoundSummary0(x) to get a starting table.
  5. If input alpha = NULL or test.type in (3, 5), return this table; i.e., behavior remains unchanged from old gsBoundSummary().
  6. For test.type in (3, 5) a message for that non-null alpha is not implemented.
  7. If alpha is non-NULL and test.type not in (3, 5), continue.
  8. Column labels will change as specified below.
  9. For non-null alpha and x$test.type in (1, 3, 5) the futility bound and its label (Futility) remains unchanged from what is returned in step 4.
  10. For each new value in alphaNew in alpha (don’t repeat the level in x$alpha) and test.type in (4, 6), run
    y <- gsDesign(alpha = alphaNew, k = x$k, test.type = 1, alpha = alphaNew, beta = x$beta, astar = x$astar, delta = x$delta,
    n.fix = NULL, timing = NULL, sfu = x$upper$sf, sfupar = x$upper$param, sfl = x$lower$sf, sflpar = x$lower$param,
    tol = x$tol, r = x$r, n.I = x$n.I, maxn.IPlan = x$n.I[x$k], delta1 = x$delta1, delta0 = x$delta0, overrun = x$overrun,
    usTime = x$usTime, lsTime = x$lsTime
    )
  11. Run yout <- gsBoundSummary0(x = y,…) where … represents other arguments to gsBoundSummary() that are input.
  12. Paste Efficacy column from yout after current efficacy columns in out.
  13. When finished with all alpha-levels (including original) relabel “Efficacy” columns to paste(“Efficacy, alpha = ”, alphaNew).
  14. For x$test.type=2 (2-sided symmetric designs) futility bounds are recomputed with gsDesign call for each alpha-level. These will be pasted to right of the original Futility column from gsBoundSummary0() call
  15. If new Futility columns added (test.type = 2), relabel original and new “Futility” columns with paste(“Futility, alpha = “, alphaNew)
  16. Output completed data frame.
@keaven keaven self-assigned this Jan 26, 2025
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

When branches are created from issues, their pull requests are automatically linked.

1 participant