Skip to content

Commit

Permalink
Merge pull request #214 from Merck/ctrl
Browse files Browse the repository at this point in the history
Rename `col` to `ctrl` in code examples and tests
  • Loading branch information
nanxstats authored Mar 8, 2024
2 parents c638370 + dbb1da1 commit 9ac40f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions R/sim_gs_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
#' )
#'
Expand Down
6 changes: 3 additions & 3 deletions man/sim_gs_n.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/testthat/helper-sim_gs_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 9ac40f3

Please sign in to comment.