Merck / gsDesign2

Group Sequential Design Under Non-Proportional Hazards
https://merck.github.io/gsDesign2/
GNU General Public License v3.0
19 stars 8 forks source link

`gs_design_ahr()` vs `gs_power_ahr()` #417

Closed yuliasidi closed 4 months ago

yuliasidi commented 4 months ago

Could you please clarify why the gs_design_ahr() and gs_power_ahr() provide slightly different bound summaries when using the same inputs:

enroll_rate <- define_enroll_rate(duration = 24, rate = 1)
fail_rate <- define_fail_rate(
  duration = 34,
  fail_rate = log(2) / 9.4,
  hr = .6,
  dropout_rate = .019
)
gsd_design <- gs_design_ahr(
  enroll_rate = enroll_rate,
  fail_rate = fail_rate,
  ratio = 1,
  alpha = 0.0125,
  beta = 1 - 0.95, 
  info_frac = c(0.75, 1),
  upper = gs_spending_bound, 
  upar = list(
    sf = gsDesign::sfLDOF, 
    total_spend = 0.0125
  ), 
  lower = gs_spending_bound,
  lpar = list(
    sf = gsDesign::sfHSD, 
    total_spend = 1 - 0.95, 
    param = -10
  ),
  info_scale = "h0_info"
)

gsd_design |>
  summary() |>
  as_gt()

gsd_power <- gs_power_ahr(
  enroll_rate = gsd_design$enroll_rate,
  fail_rate = gsd_design$fail_rate,
  ratio = 1,
  event = gsd_design$analysis$event,
  upper = gs_spending_bound, 
  upar = list(
    sf = gsDesign::sfLDOF, 
    total_spend = 0.0125
  ), 
  lower = gs_spending_bound,
  lpar = list(
    sf = gsDesign::sfHSD, 
    total_spend = 1 - 0.95, 
    param = -10
  ),
  info_scale = "h0_info"
)

gsd_power |>
  summary() |>
  as_gt()
LittleBeannie commented 4 months ago

Hi @yuliasidi , the 1st design cut by information fraction. The 2nd design cut by events. If you compare the analysis time by

gsd_design$analysis$time
 gsd_power$analysis$time

you will find the IA occurs at slightly different time. Although you put the same sample size, same treatment effect and same spending for the 2 design, the cuttings are different. This probably explains the difference in bounds.