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

Add footnotes of type I error of non-binding design #72

Closed
LittleBeannie opened this issue Oct 28, 2022 · 2 comments · Fixed by #93
Closed

Add footnotes of type I error of non-binding design #72

LittleBeannie opened this issue Oct 28, 2022 · 2 comments · Fixed by #93
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@LittleBeannie
Copy link
Collaborator

LittleBeannie commented Oct 28, 2022

In non-binding design (see example below), it is possible that the type I error is smaller than 0.025. A good strategy is to add a footnote for this probability.

library(gsDesign2)
library(dplyr)

ratio <- 1
alpha <- 0.025
beta <- 0.2
enrollRates <- tibble::tibble(Stratum = "All", 
                              duration = 12, 
                              rate = 500/12)

failRates <- tibble::tibble(Stratum = "All",
                            duration = c(4, 100),
                            failRate = log(2) / 15,  
                            hr = c(1, .6),
                            dropoutRate = 0.001)

fh_test <- rbind(data.frame(rho = 0, gamma = 0, tau = -1, test = 1, Analysis = 1:3,analysisTimes = c(12, 24, 36)),
                 data.frame(rho = c(0, 0.5), gamma = 0.5, tau = -1, test = 2:3, Analysis = 3, analysisTimes = 36))

#### Boundary derived by spending function testing
gs_design_combo(enrollRates, failRates, fh_test,
                alpha = 0.025, beta = 0.2, ratio = 1, binding = FALSE,                 # test.type = 4 non-binding futility bound
                upper = gsDesign2::gs_spending_combo,
                upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025),   # alpha spending
                lower = gsDesign2::gs_spending_combo,
                lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.2),     # beta spending
                ) %>% summary() %>% as_gt()

image

@LittleBeannie LittleBeannie added the documentation Improvements or additions to documentation label Oct 28, 2022
@LittleBeannie
Copy link
Collaborator Author

Templates form Keaven: Cumulative alpha for final analysis (0.0237) is less than the full alpha (0.025) when the futility bound is non-binding. The smaller value subtracts the probability of crossing a futility bound before crossing an efficacy bound at a later analysis (0.025 – 0.0013 = 0.0237) under the null hypothesis.

@LittleBeannie
Copy link
Collaborator Author

See the updates below
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants