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

WLR for stratified design #129

Open
LittleBeannie opened this issue Dec 16, 2022 · 4 comments
Open

WLR for stratified design #129

LittleBeannie opened this issue Dec 16, 2022 · 4 comments
Assignees
Labels

Comments

@LittleBeannie
Copy link
Collaborator

LittleBeannie commented Dec 16, 2022

The following codes give an error message.

library(gsDesign2)
library(dplyr)

enroll_rate <- tibble(stratum = rep(c("B+", "B-"), 3), 
                      duration = c(3, 3, 3, 3, 12, 12),
                      rate = c(3, 2, 6, 4, 12, 8))

fail_rate <- tibble(stratum = c(rep("B+", 2), rep("B-", 2)),
                    duration = c(4, 100, 6, 100),
                    fail_rate = log(2) / 18,
                    hr = c(1, .5, 1.2, .7),
                    dropout_rate = -log(.99) / 12)

gs_design_wlr(
  enroll_rate = enroll_rate,
  fail_rate = fail_rate,
  alpha = 0.02,
  beta = 0.15,
  info_frac = NULL,
  analysis_time = c(16, 24, 36),
  ratio = 1,
  binding = FALSE,
  upper = gs_spending_bound,
  upar = list(sf = gsDesign::sfLDOF, total_spend = 0.02, param = NULL, timing = NULL),
  lower = gs_b,
  lpar = c(qnorm(0.1), -Inf, -Inf))

Besides, the stratified max combo is not workable... considering max combo is the max of a series of WLR.

@elong0527
Copy link
Collaborator

Would you feel we need to implement stratified design in next half?

@LittleBeannie
Copy link
Collaborator Author

Would you feel we need to implement stratified design in next half?

I discussed it with Keaven yesterday, and he suggested it is nice to have but not of high priority.

@elong0527
Copy link
Collaborator

I saw the way we combine stratum in ahr is to take sum of the information.

https://github.com/Merck/gsDesign2/blob/main/R/ahr.R#L120

I will implement the approach, could you confirm with @keaven if this is what we want in WLR?

@LittleBeannie
Copy link
Collaborator Author

I saw the way we combine stratum in ahr is to take sum of the information.

https://github.com/Merck/gsDesign2/blob/main/R/ahr.R#L120

I will implement the approach, could you confirm with @keaven if this is what we want in WLR?

Hi @elong0527 , thanks for checking! Based on the conversation I had with Keaven yesterday, the answer is yes, but there is more to consider regarding how we combine different strata. Devan's 5-star approach suggests that we could use weights based on information or sample size, or a combination of both.

In the initial version of the stratified gs_design_wlr/gs_power_wlr, let's use information-based weights, which is similar to line 120 of the ahr.R file. However, in the future, we can explore the possibility of offering flexibility in choosing different weighting strategies.

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

No branches or pull requests

2 participants