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

Correct info_scale in gs_update_ahr() when updating design from initial alpha to full alpha #470

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions R/gs_design_ahr.R
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ gs_design_ahr <- function(
enroll_rate = enroll_rate, fail_rate = fail_rate,
alpha = alpha, beta = beta, ratio = ratio,
info_frac = info_frac, analysis_time = analysis_time,
info_scale = info_scale,
upper = upper, upar = upar,
lower = lower, lpar = lpar,
test_upper = test_upper, test_lower = test_lower,
Expand Down
1 change: 1 addition & 0 deletions R/gs_power_ahr.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ gs_power_ahr <- function(
input <- list(
enroll_rate = enroll_rate, fail_rate = fail_rate,
event = event, analysis_time = analysis_time,
info_scale = info_scale,
upper = upper, upar = upar,
lower = lower, lpar = lpar,
test_lower = test_lower, test_upper = test_upper,
Expand Down
19 changes: 17 additions & 2 deletions R/gs_update_ahr.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,16 @@ gs_update_ahr <- function(
x_updated_h0 <- gs_power_npe(theta = 0,
theta0 = 0,
theta1 = x$analysis$theta,
# statistical information at all analyses for input `theta`
info = x$analysis$info0,
info_scale = "h0_info",
# statistical information under null hypothesis,
# impacts null hypothesis bound calculation.
info0 = x$analysis$info0,
# statistical information under hypothesis used for
# futility bound calculation if different from `info`
# impacts futility hypothesis bound calculation.
info1 = x$analysis$info,
info_scale = x$input$info_scale,
upper = x$input$upper, upar = upar_update,
test_upper = x$input$test_upper,
lower = x$input$lower, lpar = x$input$lpar,
Expand All @@ -308,9 +316,16 @@ gs_update_ahr <- function(
x_updated_h1 <- gs_power_npe(theta = x$analysis$theta,
theta0 = 0,
theta1 = x$analysis$theta,
# statistical information under null hypothesis,
# impacts null hypothesis bound calculation.
info0 = x$analysis$info0,
# statistical information at all analyses for input `theta`
info = x$analysis$info,
info_scale = "h0_info",
# statistical information under hypothesis used for
# futility bound calculation if different from `info`
# impacts futility hypothesis bound calculation.
info1 = NULL,
info_scale = x$input$info_scale,
upper = x$input$upper, upar = upar_update,
test_upper = x$input$test_upper,
lower = x$input$lower, lpar = x$input$lpar,
Expand Down
Loading
Loading