From dbb1da17f9562f8c1c012450fb78def316dc0594 Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Wed, 6 Mar 2024 21:30:12 -0500 Subject: [PATCH] Rename `col` to `ctrl` in code examples and tests --- R/sim_gs_n.R | 6 +++--- man/sim_gs_n.Rd | 6 +++--- tests/testthat/helper-sim_gs_n.R | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/R/sim_gs_n.R b/R/sim_gs_n.R index d4663b16..e0da8808 100644 --- a/R/sim_gs_n.R +++ b/R/sim_gs_n.R @@ -52,13 +52,13 @@ #' #' # Parameters for treatment effect #' delay_effect_duration <- 3 # Delay treatment effect in months -#' median_col <- 9 # Survival median of the control arm +#' median_ctrl <- 9 # Survival median of the control arm #' median_exp <- c(9, 14) # Survival median of the experimental arm #' dropout_rate <- 0.001 #' fail_rate <- define_fail_rate( #' duration = c(delay_effect_duration, 100), -#' fail_rate = log(2) / median_col, -#' hr = median_col / median_exp, +#' fail_rate = log(2) / median_ctrl, +#' hr = median_ctrl / median_exp, #' dropout_rate = dropout_rate #' ) #' diff --git a/man/sim_gs_n.Rd b/man/sim_gs_n.Rd index ac7d80c1..959f42db 100644 --- a/man/sim_gs_n.Rd +++ b/man/sim_gs_n.Rd @@ -72,13 +72,13 @@ enroll_rate <- define_enroll_rate( # Parameters for treatment effect delay_effect_duration <- 3 # Delay treatment effect in months -median_col <- 9 # Survival median of the control arm +median_ctrl <- 9 # Survival median of the control arm median_exp <- c(9, 14) # Survival median of the experimental arm dropout_rate <- 0.001 fail_rate <- define_fail_rate( duration = c(delay_effect_duration, 100), - fail_rate = log(2) / median_col, - hr = median_col / median_exp, + fail_rate = log(2) / median_ctrl, + hr = median_ctrl / median_exp, dropout_rate = dropout_rate ) diff --git a/tests/testthat/helper-sim_gs_n.R b/tests/testthat/helper-sim_gs_n.R index 1ced5514..94e49a7b 100644 --- a/tests/testthat/helper-sim_gs_n.R +++ b/tests/testthat/helper-sim_gs_n.R @@ -15,13 +15,13 @@ test_enroll_rate <- function() { test_fail_rate <- function() { # parameters for treatment effect delay_effect_duration <- 3 # delay treatment effect in months - median_col <- 9 # survival median of the control arm + median_ctrl <- 9 # survival median of the control arm median_exp <- c(9, 14) # survival median of the experimental arm dropout_rate <- 0.001 fail_rate <- gsDesign2::define_fail_rate( duration = c(delay_effect_duration, 100), - fail_rate = log(2) / median_col, - hr = median_col / median_exp, + fail_rate = log(2) / median_ctrl, + hr = median_ctrl / median_exp, dropout_rate = dropout_rate ) return(fail_rate) @@ -31,7 +31,7 @@ test_cutting <- function() { # other related parameters alpha <- 0.025 # type I error beta <- 0.1 # type II error - ratio <- 1 # randomization ratio (exp:col) + ratio <- 1 # randomization ratio (exp:ctrl) # Define cuttings of 2 IAs and 1 FA # IA1 # The 1st interim analysis will occur at the later of the following 3 conditions: