Skip to content

Commit 87059f9

Browse files
authored
Merge pull request #470 from Merck/469-info-scale-when-updating-design-from-initial-alpha-to-full-alpha
Correct `info_scale` in `gs_update_ahr()` when updating design from initial alpha to full alpha
2 parents f9aab1a + 3e1e3de commit 87059f9

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

R/gs_design_ahr.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ gs_design_ahr <- function(
360360
enroll_rate = enroll_rate, fail_rate = fail_rate,
361361
alpha = alpha, beta = beta, ratio = ratio,
362362
info_frac = info_frac, analysis_time = analysis_time,
363+
info_scale = info_scale,
363364
upper = upper, upar = upar,
364365
lower = lower, lpar = lpar,
365366
test_upper = test_upper, test_lower = test_lower,

R/gs_power_ahr.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ gs_power_ahr <- function(
261261
input <- list(
262262
enroll_rate = enroll_rate, fail_rate = fail_rate,
263263
event = event, analysis_time = analysis_time,
264+
info_scale = info_scale,
264265
upper = upper, upar = upar,
265266
lower = lower, lpar = lpar,
266267
test_lower = test_lower, test_upper = test_upper,

R/gs_update_ahr.R

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,16 @@ gs_update_ahr <- function(
296296
x_updated_h0 <- gs_power_npe(theta = 0,
297297
theta0 = 0,
298298
theta1 = x$analysis$theta,
299+
# statistical information at all analyses for input `theta`
299300
info = x$analysis$info0,
300-
info_scale = "h0_info",
301+
# statistical information under null hypothesis,
302+
# impacts null hypothesis bound calculation.
303+
info0 = x$analysis$info0,
304+
# statistical information under hypothesis used for
305+
# futility bound calculation if different from `info`
306+
# impacts futility hypothesis bound calculation.
307+
info1 = x$analysis$info,
308+
info_scale = x$input$info_scale,
301309
upper = x$input$upper, upar = upar_update,
302310
test_upper = x$input$test_upper,
303311
lower = x$input$lower, lpar = x$input$lpar,
@@ -308,9 +316,16 @@ gs_update_ahr <- function(
308316
x_updated_h1 <- gs_power_npe(theta = x$analysis$theta,
309317
theta0 = 0,
310318
theta1 = x$analysis$theta,
319+
# statistical information under null hypothesis,
320+
# impacts null hypothesis bound calculation.
311321
info0 = x$analysis$info0,
322+
# statistical information at all analyses for input `theta`
312323
info = x$analysis$info,
313-
info_scale = "h0_info",
324+
# statistical information under hypothesis used for
325+
# futility bound calculation if different from `info`
326+
# impacts futility hypothesis bound calculation.
327+
info1 = NULL,
328+
info_scale = x$input$info_scale,
314329
upper = x$input$upper, upar = upar_update,
315330
test_upper = x$input$test_upper,
316331
lower = x$input$lower, lpar = x$input$lpar,

0 commit comments

Comments
 (0)