Simulation of a Two-Group Parallel-Arm RCT with Interim Analyses

A simulation of a two-group parallel-arm randomized trial with interim analysis using the rpact package.
Author
Published

February 1, 2021

Keywords

statistical reporting, statistics, interim analysis, randomized controlled trial, RCT, clinical trials, rpact, simulation


Recently Andrew Althouse informed me that he was going to simulate a two-group parallel-arm randomized trial with interim analyses using the rpact R package, so I offered to also help in constructing the R code to do so. He already has a number of R scripts on his GitHub repo for doing similar simulations, which can be viewed here and a number of tweets explaining these simulations. For this example, his goal was to simulate a trial where the outcome was binary and the probability of death for each group could be tuned in addition to:






along with the usual trial analysis parameters such as:




The goal was to be able to produce a table of various statistics such as:






for each of the interim analyses specified.


The function below is a reflection of our efforts to do so, and also returns several plots from the rpact package for the design that is chosen along with a plot comparing the design to other designs. In order to get similar results, you will need to load the R function first, and then simply enter the proper inputs. While there may be more efficient ways to write the code, for example using lapply() instead of for loops, we have chosen not to do so, and we have also tried to minimize the number of R packages necessary for the function to work but the following will be required:




You can quickly install and load both using:



Setting up the Function


#' @title Simulation of a Two-Group Parallel-Arm Trial With Interim Analyses
#' @docType Custom function for simulation from the rpact package
#' @author Andrew Althouse with edits by Zad Rafi
#' NOTE: If you want to confirm "type 1 error" under different stopping rules,
#' make death = in the two treatment arms (e.g. no treatment effect)
#' NOTE: I have set this one up to test the power for a treatment that would reduce mortality
#' from 40% in control group (1) to 30% in treatment group (2)
#' NOTE: Trial Design Parameters - Part 1
#' Here we will specify the basics: total N patients to enroll, and death rate for each treatment arm
#' NOTE: Trial Design Parameters - Part 2
#' Here we will define the interim analysis strategy and stopping rules
#' For this trial we will include provisions for efficacy stopping only (no pre-specified futility stopping)
#' We will use the rpact package to compute the stopping/success thresholds at the interim and final analysis
#' NOTE: Required packages: rpact and stringr
#' @param nSims # The number of simulations, the default is 1000
#' @param nPatients # here is where you specify the planned max number of patients you want included in each RCT
#' @param death1 # here is where you specify the event rate for patients receiving 'treatment 1' in these trial
#' @param death2 # here is where you specify the event rate for patients receiving 'treatment 2' in these trials
#' @param nLooks # here is where you put the number of looks that will take place (INCLUDING the final analysis)
#' @param analyses_scheduled # schedule of interim analyses
#' @param sided # Whether the test is 1-sided or 2-sided
#' @param alpha # Specified alpha level, the default is 0.05
#' @param informationRates #
#' @param trials # The total number of trials you wish to load in the table results.
#' @param typeOfDesign # The type of design.
#' @param seed # Argument to set the seed for the simulations
#' @return list of dataframes and plots
#' @example See below this code block
interim_sim <- function(nPatients = 1000, death1 = 0.4, death2 = 0.3,
                        nLooks = 4, analyses_scheduled = c(0.25, 0.50, 0.75, 1),
                        sided = 1, alpha = 0.05,
                        informationRates = analyses_scheduled,
                        typeOfDesign = "asOF", nSims = 1000, trials = 10,
                        seed = 1031) {

efficacy_thresholds <- numeric(nLooks)
design <- getDesignGroupSequential(
  sided = sided, alpha = alpha,
  informationRates = analyses_scheduled,
  typeOfDesign = typeOfDesign)
design_2 <- getDesignGroupSequential(typeOfDesign = "P") # Pocock
design_3 <- getDesignGroupSequential(typeOfDesign = "asP") # Alpha-spending Pocock
design_4 <- getDesignGroupSequential(typeOfDesign = "OF") # O'Brien-Fleming
designSet <- getDesignSet(designs = c(design, design_2,
                                      design_3, design_4),
                          variedParameters = "typeOfDesign")

RNGkind(kind = "L'Ecuyer-CMRG")
set.seed(seed)
for (j in 1:nLooks) {
  efficacy_thresholds[j] <- design$stageLevels[j]
}

analyses_nPatients <- analyses_scheduled * nPatients
efficacy_thresholds
pb <- txtProgressBar(min = 0, max = nSims, initial = 0, style = 3)
trialnum <- numeric(nSims)
or <- data.frame(matrix(ncol = nLooks, nrow = nSims))
lcl <- data.frame(matrix(ncol = nLooks, nrow = nSims))
ucl <- data.frame(matrix(ncol = nLooks, nrow = nSims))
pval <- data.frame(matrix(ncol = nLooks, nrow = nSims))
success <- data.frame(matrix(ncol = nLooks, nrow = nSims))

strings <- c("OR_%d", "LCL_%d", "UCL_%d",
             "Pval_%d", "Success_%d")

colnames(or) <- sprintf("OR_%d", (1:nLooks))
colnames(lcl) <- sprintf("LCL_%d", (1:nLooks))
colnames(ucl) <- sprintf("UCL_%d", (1:nLooks))
colnames(pval) <- sprintf("Pval_%d", (1:nLooks))
colnames(success) <- sprintf("Success_%d", (1:nLooks))
overall_success <- numeric(nSims)
df <- data.frame(trialnum, or, lcl, ucl,
                 pval, success, overall_success)

RNGkind(kind = "L'Ecuyer-CMRG")
set.seed(seed)
time <- system.time(
for (i in 1:nSims) {
  trialnum[i] <- i
  pid <- seq(1, nPatients, by = 1)
  treatment <- rep(1:2, nPatients / 2)
  deathprob <- numeric(nPatients)
  deathprob[treatment == 1] <- death1
  deathprob[treatment == 2] <- death2
  death <- rbinom(nPatients, 1, deathprob)
  trialdata <- data.frame(cbind(pid, treatment, death))

  for (j in 1:nLooks) {
    analysisdata <- subset(trialdata, pid <= analyses_nPatients[j])
    model <- glm(death ~ treatment,
                 family = binomial(link = "logit"),
                 data = analysisdata)
    or[i, j] <- exp(summary(model)$coefficients[2])
    lcl[i, j] <- exp(confint.default((model))[2, 1])
    ucl[i, j] <- exp(confint.default((model))[2, 2])
    pval[i, j] <- summary(model)$coefficients[8]
    success[i, j] <- ifelse(or[i, j] < 1 & pval[i, j] < efficacy_thresholds[j], 1, 0)
  }
  overall_success[i] <- 0
  for (j in 1:nLooks) {
    if (success[i, j] == 1) {
      overall_success[i] <- 1
    }
  }
    setTxtProgressBar(pb, i)
})

df <- data.frame(trialnum, or, lcl, ucl, pval,
                 success, overall_success)
simulation_results <- data.frame(matrix(vector(),
  nrow = nPatients, ncol = (length(df))))
colnames(simulation_results) <- c("trialnum", (do.call(
  rbind,
  lapply(1:length(strings),
    FUN = function(j) {
      (do.call(rbind, lapply(1:nLooks,
        FUN = function(i) ((sprintf(strings, i)))
      )[]))[, j]
    }
  )
)), "overall_success")
simulation_results[intersect(names(df), names(simulation_results))] <- (df[intersect(
  names(df),
  names(simulation_results)
)])
simulation_results <- as.data.frame(simulation_results)

outputs <- simulation_results[, c(-1, -length(simulation_results))]

cols <- as.character(1:nLooks)
rows <- as.character(1:length(strings))
interim <- matrix(
  nrow = length(strings), ncol = nLooks,
  dimnames = list((rows), (cols)),
  data = rep(0, (length(strings) * nLooks)))

for (i in cols) {
  interim[, i] <- str_subset(colnames(outputs), i)
}

colnames(interim) <- sprintf("Interim_Look_%d", (1:nLooks))
colnames(simulation_results)[1] <- c("TrialNum")
colnames(simulation_results)[length(simulation_results)] <- c("Overall_Success")
simulation_results_trials <- head(simulation_results, trials)
results <- list(
  summary(design),
  summary(time),
  plot(design, 1) +
    theme_light() +
    theme(
      plot.title = element_text(size = 14, face = "bold"),
      axis.title = element_text(size = 12, face = "bold")
    ),
  plot(designSet, type = 1) +
    theme_light() +
    theme(
      plot.title = element_text(size = 14, face = "bold"),
      axis.title = element_text(size = 12, face = "bold")
    ),
  table(overall_success),
  simulation_results_trials)

names(results) <- c(
  "Design Summary", "Time to complete simulation",
  "Main Design Plot", "Plot of Various Designs",
  "Table of Overall Success", "Simulation Results")

return(results)
}

A Simulated Example


results <- interim_sim(nPatients = 1000, death1 = 0.4, death2 = 0.3,
                       nLooks = 4, analyses_scheduled = c(0.25, 0.50, 0.75, 1),
                       sided = 1, alpha = 0.025, typeOfDesign = "asOF",
                       informationRates =  c(0.25, 0.50, 0.75, 1),
                       nSims = 1000, trials = 20, seed = 1031)

results <- interim_sim(nPatients = 1000, death1 = 0.4, death2 = 0.3, nLooks = 4,
                       analyses_scheduled = c(0.25, 0.50, 0.75, 1),
                       sided = 1, alpha = 0.025, typeOfDesign = "asOF",
                       informationRates =  c(0.25, 0.50, 0.75, 1),
                       nSims = 1000, trials = 20, seed = 1031)
#> 
  |                                                                                                                              
  |                                                                                                                        |   0%
  |                                                                                                                              
  |=                                                                                                                       |   0%
  |                                                                                                                              
  |=                                                                                                                       |   1%
  |                                                                                                                              
  |==                                                                                                                      |   1%
  |                                                                                                                              
  |==                                                                                                                      |   2%
  |                                                                                                                              
  |===                                                                                                                     |   2%
  |                                                                                                                              
  |===                                                                                                                     |   3%
  |                                                                                                                              
  |====                                                                                                                    |   3%
  |                                                                                                                              
  |====                                                                                                                    |   4%
  |                                                                                                                              
  |=====                                                                                                                   |   4%
  |                                                                                                                              
  |======                                                                                                                  |   5%
  |                                                                                                                              
  |=======                                                                                                                 |   6%
  |                                                                                                                              
  |========                                                                                                                |   6%
  |                                                                                                                              
  |========                                                                                                                |   7%
  |                                                                                                                              
  |=========                                                                                                               |   7%
  |                                                                                                                              
  |=========                                                                                                               |   8%
  |                                                                                                                              
  |==========                                                                                                              |   8%
  |                                                                                                                              
  |==========                                                                                                              |   9%
  |                                                                                                                              
  |===========                                                                                                             |   9%
  |                                                                                                                              
  |===========                                                                                                             |  10%
  |                                                                                                                              
  |============                                                                                                            |  10%
  |                                                                                                                              
  |=============                                                                                                           |  10%
  |                                                                                                                              
  |=============                                                                                                           |  11%
  |                                                                                                                              
  |==============                                                                                                          |  11%
  |                                                                                                                              
  |==============                                                                                                          |  12%
  |                                                                                                                              
  |===============                                                                                                         |  12%
  |                                                                                                                              
  |===============                                                                                                         |  13%
  |                                                                                                                              
  |================                                                                                                        |  13%
  |                                                                                                                              
  |================                                                                                                        |  14%
  |                                                                                                                              
  |=================                                                                                                       |  14%
  |                                                                                                                              
  |==================                                                                                                      |  15%
  |                                                                                                                              
  |===================                                                                                                     |  16%
  |                                                                                                                              
  |====================                                                                                                    |  16%
  |                                                                                                                              
  |====================                                                                                                    |  17%
  |                                                                                                                              
  |=====================                                                                                                   |  17%
  |                                                                                                                              
  |=====================                                                                                                   |  18%
  |                                                                                                                              
  |======================                                                                                                  |  18%
  |                                                                                                                              
  |======================                                                                                                  |  19%
  |                                                                                                                              
  |=======================                                                                                                 |  19%
  |                                                                                                                              
  |=======================                                                                                                 |  20%
  |                                                                                                                              
  |========================                                                                                                |  20%
  |                                                                                                                              
  |=========================                                                                                               |  20%
  |                                                                                                                              
  |=========================                                                                                               |  21%
  |                                                                                                                              
  |==========================                                                                                              |  21%
  |                                                                                                                              
  |==========================                                                                                              |  22%
  |                                                                                                                              
  |===========================                                                                                             |  22%
  |                                                                                                                              
  |===========================                                                                                             |  23%
  |                                                                                                                              
  |============================                                                                                            |  23%
  |                                                                                                                              
  |============================                                                                                            |  24%
  |                                                                                                                              
  |=============================                                                                                           |  24%
  |                                                                                                                              
  |==============================                                                                                          |  25%
  |                                                                                                                              
  |===============================                                                                                         |  26%
  |                                                                                                                              
  |================================                                                                                        |  26%
  |                                                                                                                              
  |================================                                                                                        |  27%
  |                                                                                                                              
  |=================================                                                                                       |  27%
  |                                                                                                                              
  |=================================                                                                                       |  28%
  |                                                                                                                              
  |==================================                                                                                      |  28%
  |                                                                                                                              
  |==================================                                                                                      |  29%
  |                                                                                                                              
  |===================================                                                                                     |  29%
  |                                                                                                                              
  |===================================                                                                                     |  30%
  |                                                                                                                              
  |====================================                                                                                    |  30%
  |                                                                                                                              
  |=====================================                                                                                   |  30%
  |                                                                                                                              
  |=====================================                                                                                   |  31%
  |                                                                                                                              
  |======================================                                                                                  |  31%
  |                                                                                                                              
  |======================================                                                                                  |  32%
  |                                                                                                                              
  |=======================================                                                                                 |  32%
  |                                                                                                                              
  |=======================================                                                                                 |  33%
  |                                                                                                                              
  |========================================                                                                                |  33%
  |                                                                                                                              
  |========================================                                                                                |  34%
  |                                                                                                                              
  |=========================================                                                                               |  34%
  |                                                                                                                              
  |==========================================                                                                              |  35%
  |                                                                                                                              
  |===========================================                                                                             |  36%
  |                                                                                                                              
  |============================================                                                                            |  36%
  |                                                                                                                              
  |============================================                                                                            |  37%
  |                                                                                                                              
  |=============================================                                                                           |  37%
  |                                                                                                                              
  |=============================================                                                                           |  38%
  |                                                                                                                              
  |==============================================                                                                          |  38%
  |                                                                                                                              
  |==============================================                                                                          |  39%
  |                                                                                                                              
  |===============================================                                                                         |  39%
  |                                                                                                                              
  |===============================================                                                                         |  40%
  |                                                                                                                              
  |================================================                                                                        |  40%
  |                                                                                                                              
  |=================================================                                                                       |  40%
  |                                                                                                                              
  |=================================================                                                                       |  41%
  |                                                                                                                              
  |==================================================                                                                      |  41%
  |                                                                                                                              
  |==================================================                                                                      |  42%
  |                                                                                                                              
  |===================================================                                                                     |  42%
  |                                                                                                                              
  |===================================================                                                                     |  43%
  |                                                                                                                              
  |====================================================                                                                    |  43%
  |                                                                                                                              
  |====================================================                                                                    |  44%
  |                                                                                                                              
  |=====================================================                                                                   |  44%
  |                                                                                                                              
  |======================================================                                                                  |  45%
  |                                                                                                                              
  |=======================================================                                                                 |  46%
  |                                                                                                                              
  |========================================================                                                                |  46%
  |                                                                                                                              
  |========================================================                                                                |  47%
  |                                                                                                                              
  |=========================================================                                                               |  47%
  |                                                                                                                              
  |=========================================================                                                               |  48%
  |                                                                                                                              
  |==========================================================                                                              |  48%
  |                                                                                                                              
  |==========================================================                                                              |  49%
  |                                                                                                                              
  |===========================================================                                                             |  49%
  |                                                                                                                              
  |===========================================================                                                             |  50%
  |                                                                                                                              
  |============================================================                                                            |  50%
  |                                                                                                                              
  |=============================================================                                                           |  50%
  |                                                                                                                              
  |=============================================================                                                           |  51%
  |                                                                                                                              
  |==============================================================                                                          |  51%
  |                                                                                                                              
  |==============================================================                                                          |  52%
  |                                                                                                                              
  |===============================================================                                                         |  52%
  |                                                                                                                              
  |===============================================================                                                         |  53%
  |                                                                                                                              
  |================================================================                                                        |  53%
  |                                                                                                                              
  |================================================================                                                        |  54%
  |                                                                                                                              
  |=================================================================                                                       |  54%
  |                                                                                                                              
  |==================================================================                                                      |  55%
  |                                                                                                                              
  |===================================================================                                                     |  56%
  |                                                                                                                              
  |====================================================================                                                    |  56%
  |                                                                                                                              
  |====================================================================                                                    |  57%
  |                                                                                                                              
  |=====================================================================                                                   |  57%
  |                                                                                                                              
  |=====================================================================                                                   |  58%
  |                                                                                                                              
  |======================================================================                                                  |  58%
  |                                                                                                                              
  |======================================================================                                                  |  59%
  |                                                                                                                              
  |=======================================================================                                                 |  59%
  |                                                                                                                              
  |=======================================================================                                                 |  60%
  |                                                                                                                              
  |========================================================================                                                |  60%
  |                                                                                                                              
  |=========================================================================                                               |  60%
  |                                                                                                                              
  |=========================================================================                                               |  61%
  |                                                                                                                              
  |==========================================================================                                              |  61%
  |                                                                                                                              
  |==========================================================================                                              |  62%
  |                                                                                                                              
  |===========================================================================                                             |  62%
  |                                                                                                                              
  |===========================================================================                                             |  63%
  |                                                                                                                              
  |============================================================================                                            |  63%
  |                                                                                                                              
  |============================================================================                                            |  64%
  |                                                                                                                              
  |=============================================================================                                           |  64%
  |                                                                                                                              
  |==============================================================================                                          |  65%
  |                                                                                                                              
  |===============================================================================                                         |  66%
  |                                                                                                                              
  |================================================================================                                        |  66%
  |                                                                                                                              
  |================================================================================                                        |  67%
  |                                                                                                                              
  |=================================================================================                                       |  67%
  |                                                                                                                              
  |=================================================================================                                       |  68%
  |                                                                                                                              
  |==================================================================================                                      |  68%
  |                                                                                                                              
  |==================================================================================                                      |  69%
  |                                                                                                                              
  |===================================================================================                                     |  69%
  |                                                                                                                              
  |===================================================================================                                     |  70%
  |                                                                                                                              
  |====================================================================================                                    |  70%
  |                                                                                                                              
  |=====================================================================================                                   |  70%
  |                                                                                                                              
  |=====================================================================================                                   |  71%
  |                                                                                                                              
  |======================================================================================                                  |  71%
  |                                                                                                                              
  |======================================================================================                                  |  72%
  |                                                                                                                              
  |=======================================================================================                                 |  72%
  |                                                                                                                              
  |=======================================================================================                                 |  73%
  |                                                                                                                              
  |========================================================================================                                |  73%
  |                                                                                                                              
  |========================================================================================                                |  74%
  |                                                                                                                              
  |=========================================================================================                               |  74%
  |                                                                                                                              
  |==========================================================================================                              |  75%
  |                                                                                                                              
  |===========================================================================================                             |  76%
  |                                                                                                                              
  |============================================================================================                            |  76%
  |                                                                                                                              
  |============================================================================================                            |  77%
  |                                                                                                                              
  |=============================================================================================                           |  77%
  |                                                                                                                              
  |=============================================================================================                           |  78%
  |                                                                                                                              
  |==============================================================================================                          |  78%
  |                                                                                                                              
  |==============================================================================================                          |  79%
  |                                                                                                                              
  |===============================================================================================                         |  79%
  |                                                                                                                              
  |===============================================================================================                         |  80%
  |                                                                                                                              
  |================================================================================================                        |  80%
  |                                                                                                                              
  |=================================================================================================                       |  80%
  |                                                                                                                              
  |=================================================================================================                       |  81%
  |                                                                                                                              
  |==================================================================================================                      |  81%
  |                                                                                                                              
  |==================================================================================================                      |  82%
  |                                                                                                                              
  |===================================================================================================                     |  82%
  |                                                                                                                              
  |===================================================================================================                     |  83%
  |                                                                                                                              
  |====================================================================================================                    |  83%
  |                                                                                                                              
  |====================================================================================================                    |  84%
  |                                                                                                                              
  |=====================================================================================================                   |  84%
  |                                                                                                                              
  |======================================================================================================                  |  85%
  |                                                                                                                              
  |=======================================================================================================                 |  86%
  |                                                                                                                              
  |========================================================================================================                |  86%
  |                                                                                                                              
  |========================================================================================================                |  87%
  |                                                                                                                              
  |=========================================================================================================               |  87%
  |                                                                                                                              
  |=========================================================================================================               |  88%
  |                                                                                                                              
  |==========================================================================================================              |  88%
  |                                                                                                                              
  |==========================================================================================================              |  89%
  |                                                                                                                              
  |===========================================================================================================             |  89%
  |                                                                                                                              
  |===========================================================================================================             |  90%
  |                                                                                                                              
  |============================================================================================================            |  90%
  |                                                                                                                              
  |=============================================================================================================           |  90%
  |                                                                                                                              
  |=============================================================================================================           |  91%
  |                                                                                                                              
  |==============================================================================================================          |  91%
  |                                                                                                                              
  |==============================================================================================================          |  92%
  |                                                                                                                              
  |===============================================================================================================         |  92%
  |                                                                                                                              
  |===============================================================================================================         |  93%
  |                                                                                                                              
  |================================================================================================================        |  93%
  |                                                                                                                              
  |================================================================================================================        |  94%
  |                                                                                                                              
  |=================================================================================================================       |  94%
  |                                                                                                                              
  |==================================================================================================================      |  95%
  |                                                                                                                              
  |===================================================================================================================     |  96%
  |                                                                                                                              
  |====================================================================================================================    |  96%
  |                                                                                                                              
  |====================================================================================================================    |  97%
  |                                                                                                                              
  |=====================================================================================================================   |  97%
  |                                                                                                                              
  |=====================================================================================================================   |  98%
  |                                                                                                                              
  |======================================================================================================================  |  98%
  |                                                                                                                              
  |======================================================================================================================  |  99%
  |                                                                                                                              
  |======================================================================================================================= |  99%
  |                                                                                                                              
  |======================================================================================================================= | 100%
  |                                                                                                                              
  |========================================================================================================================| 100%


Examining the Results

results[1:5]
#> $`Design Summary`
#> 
#> $`Time to complete simulation`
#>    user  system elapsed 
#>   5.865   0.703   6.744 
#> 
#> $`Main Design Plot`
#> NULL
#> 
#> $`Plot of Various Designs`
#> NULL
#> 
#> $`Table of Overall Success`
#> overall_success
#>   0   1 
#> 134 866


table_results <- results[[6]]

table_results[ , 2:21] <- round((table_results[ , 2:21]), 3)

table_results$TrialNum <- row.names(table_results)
row.names(table_results) <- NULL

for (i in colnames(table_results)){
  table_results[,i] <- cell_spec(table_results[,i], color = "#777")
}

table_results <- table_results[c(colnames(table_results))]

To examine the results, I used the kableExtra package, though this is not necessary, and simply using the following script will suffice


table_results <- results[[6]]
View(table_results)

Interim_Look_1
Interim_Look_2
Interim_Look_3
Interim_Look_4
TrialNum OR_1 LCL_1 UCL_1 Pval_1 Success_1 OR_2 LCL_2 UCL_2 Pval_2 Success_2 OR_3 LCL_3 UCL_3 Pval_3 Success_3 OR_4 LCL_4 UCL_4 Pval_4 Success_4 Overall_Success
1 0.936 0.565 1.55 0.797 0 0.868 0.601 1.255 0.453 0 1.036 0.767 1.398 0.818 0 0.891 0.687 1.157 0.387 0 0
2 0.87 0.519 1.459 0.598 0 0.757 0.525 1.092 0.136 0 0.745 0.551 1.007 0.056 0 0.721 0.555 0.936 0.014 1 1
3 0.59 0.35 0.996 0.048 0 0.555 0.382 0.806 0.002 0 0.676 0.5 0.916 0.011 0 0.686 0.529 0.89 0.005 1 1
4 0.652 0.385 1.103 0.111 0 0.671 0.461 0.976 0.037 0 0.725 0.533 0.988 0.042 0 0.75 0.576 0.976 0.032 0 0
5 0.674 0.398 1.142 0.143 0 0.763 0.526 1.108 0.155 0 0.835 0.617 1.132 0.246 0 0.764 0.587 0.994 0.045 0 0
6 0.525 0.309 0.892 0.017 0 0.622 0.427 0.907 0.014 0 0.668 0.491 0.909 0.01 0 0.625 0.479 0.815 0.001 1 1
7 0.742 0.433 1.269 0.275 0 0.769 0.525 1.125 0.175 0 0.76 0.558 1.037 0.083 0 0.719 0.551 0.938 0.015 1 1
8 0.661 0.394 1.108 0.116 0 0.437 0.301 0.632 0 1 0.535 0.397 0.721 0 1 0.551 0.425 0.714 0 1 1
9 1.288 0.76 2.183 0.348 0 1.113 0.769 1.612 0.571 0 0.87 0.645 1.173 0.361 0 0.771 0.596 0.999 0.049 0 0
10 0.783 0.466 1.316 0.356 0 0.701 0.484 1.015 0.06 0 0.655 0.482 0.89 0.007 1 0.614 0.472 0.798 0 1 1
11 0.577 0.344 0.968 0.037 0 0.639 0.444 0.921 0.016 0 0.56 0.415 0.754 0 1 0.577 0.446 0.748 0 1 1
12 0.538 0.315 0.919 0.023 0 0.629 0.434 0.913 0.015 0 0.576 0.426 0.78 0 1 0.561 0.431 0.731 0 1 1
13 0.79 0.474 1.315 0.364 0 0.763 0.531 1.095 0.142 0 0.789 0.588 1.06 0.115 0 0.791 0.611 1.025 0.076 0 0
14 0.535 0.318 0.902 0.019 0 0.69 0.477 0.999 0.049 0 0.583 0.43 0.792 0.001 1 0.621 0.477 0.809 0 1 1
15 0.695 0.419 1.152 0.158 0 0.744 0.516 1.073 0.114 0 0.73 0.541 0.985 0.04 0 0.64 0.493 0.83 0.001 1 1
16 1.116 0.657 1.896 0.685 0 0.763 0.526 1.108 0.155 0 0.69 0.509 0.935 0.017 0 0.69 0.532 0.896 0.005 1 1
17 0.533 0.32 0.886 0.015 0 0.585 0.407 0.839 0.004 0 0.679 0.504 0.913 0.011 0 0.622 0.48 0.806 0 1 1
18 0.613 0.364 1.033 0.066 0 0.692 0.478 1 0.05 0 0.78 0.577 1.055 0.107 0 0.705 0.543 0.914 0.008 1 1
19 0.841 0.502 1.409 0.511 0 0.768 0.531 1.11 0.16 0 0.685 0.506 0.927 0.014 0 0.665 0.511 0.864 0.002 1 1
20 0.275 0.159 0.476 0 1 0.449 0.31 0.651 0 1 0.498 0.369 0.672 0 1 0.498 0.384 0.646 0 1 1
Abbreviations:
TrialNum: Trial Number | OR: Odds Ratio | LCL: Lower Confidence Level | UCL: Upper Confidence Level | Pval: P-value

Statistical Environment


The analyses were run on:


#> ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.5.2 (2025-10-31)
#>  os       macOS Tahoe 26.3
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  C.UTF-8
#>  ctype    C.UTF-8
#>  tz       America/New_York
#>  date     2026-01-07
#>  pandoc   3.8.3 @ /opt/homebrew/bin/ (via rmarkdown)
#>  quarto   1.8.26 @ /Applications/quarto/bin/quarto
#> 
#> ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  ! package           * version    date (UTC) lib source
#>    abind               1.4-8      2024-09-12 [1] CRAN (R 4.5.0)
#>    Amelia            * 1.8.3      2024-11-08 [1] CRAN (R 4.5.0)
#>    arm                 1.14-4     2024-04-01 [1] CRAN (R 4.5.0)
#>    arrayhelpers        1.1-0      2020-02-04 [1] CRAN (R 4.5.0)
#>    askpass             1.2.1      2024-10-04 [1] CRAN (R 4.5.0)
#>    backports           1.5.0      2024-05-23 [1] CRAN (R 4.5.0)
#>    base              * 4.5.2      2025-11-01 [?] local
#>    base64enc           0.1-3      2015-07-28 [1] CRAN (R 4.5.0)
#>    bayesplot         * 1.15.0     2025-12-12 [1] CRAN (R 4.5.2)
#>    bcaboot             0.2-3      2021-05-09 [1] CRAN (R 4.5.0)
#>    bitops              1.0-9      2024-10-03 [1] CRAN (R 4.5.0)
#>    blogdown          * 1.22.2     2026-01-06 [1] Github (rstudio/blogdown@18ea707)
#>    boot              * 1.3-32     2025-08-29 [1] CRAN (R 4.5.0)
#>    bootImpute        * 1.3.0      2025-12-15 [1] CRAN (R 4.5.2)
#>    bridgesampling      1.2-1      2025-11-19 [1] CRAN (R 4.5.2)
#>    brms              * 2.23.0     2025-09-09 [1] CRAN (R 4.5.0)
#>    Brobdingnag         1.2-9      2022-10-19 [1] CRAN (R 4.5.0)
#>    broom             * 1.0.11     2025-12-04 [1] CRAN (R 4.5.2)
#>    broom.mixed       * 0.2.9.6    2024-10-15 [1] CRAN (R 4.5.0)
#>    Cairo             * 1.7-0      2025-10-29 [1] CRAN (R 4.5.0)
#>    car               * 3.1-3      2024-09-27 [1] CRAN (R 4.5.0)
#>    carData           * 3.0-5      2022-01-06 [1] CRAN (R 4.5.0)
#>    caTools             1.18.3     2024-09-04 [1] CRAN (R 4.5.0)
#>    checkmate         * 2.3.3      2025-08-18 [1] CRAN (R 4.5.0)
#>    class               7.3-23     2025-01-01 [1] CRAN (R 4.5.0)
#>    cli               * 3.6.5      2025-04-23 [1] CRAN (R 4.5.0)
#>    clipr               0.8.0      2022-02-22 [1] CRAN (R 4.5.0)
#>    cluster             2.1.8.1    2025-03-12 [1] CRAN (R 4.5.0)
#>    coda              * 0.19-4.1   2024-01-31 [1] CRAN (R 4.5.0)
#>    codetools           0.2-20     2024-03-31 [1] CRAN (R 4.5.0)
#>    colorspace        * 2.1-2      2025-09-22 [1] CRAN (R 4.5.0)
#>  P compiler            4.5.2      2025-11-01 [1] local
#>    concurve          * 2.7.7      2026-01-04 [1] Github (zadrafi/concurve@088c0ca)
#>    cowplot           * 1.2.0      2025-07-07 [1] CRAN (R 4.5.0)
#>    crayon              1.5.3      2024-06-20 [1] CRAN (R 4.5.0)
#>    curl                7.0.0      2025-08-19 [1] CRAN (R 4.5.0)
#>    data.table          1.18.0     2025-12-24 [1] CRAN (R 4.5.2)
#>  P datasets          * 4.5.2      2025-11-01 [1] local
#>    DBI                 1.2.3      2024-06-02 [1] CRAN (R 4.5.0)
#>    DEoptimR            1.1-4      2025-07-27 [1] CRAN (R 4.5.0)
#>    desc                1.4.3      2023-12-10 [1] CRAN (R 4.5.0)
#>    details             0.4.0      2025-02-09 [1] CRAN (R 4.5.0)
#>    dichromat           2.0-0.1    2022-05-02 [1] CRAN (R 4.5.0)
#>    digest              0.6.39     2025-11-19 [1] CRAN (R 4.5.2)
#>    distributional      0.5.0      2024-09-17 [1] CRAN (R 4.5.0)
#>    doParallel        * 1.0.17     2022-02-07 [1] CRAN (R 4.5.0)
#>    doRNG               1.8.6.2    2025-04-02 [1] CRAN (R 4.5.0)
#>    dplyr             * 1.1.4      2023-11-17 [1] CRAN (R 4.5.0)
#>    e1071               1.7-17     2025-12-18 [1] CRAN (R 4.5.2)
#>    emmeans             2.0.1      2025-12-16 [1] CRAN (R 4.5.2)
#>    estimability        1.5.1      2024-05-12 [1] CRAN (R 4.5.0)
#>    evaluate            1.0.5      2025-08-27 [1] CRAN (R 4.5.0)
#>    extremevalues       2.4.1      2024-12-17 [1] CRAN (R 4.5.0)
#>    farver              2.1.2      2024-05-13 [1] CRAN (R 4.5.0)
#>    fastmap             1.2.0      2024-05-15 [1] CRAN (R 4.5.0)
#>    flextable           0.9.10     2025-08-24 [1] CRAN (R 4.5.0)
#>    fontBitstreamVera   0.1.1      2017-02-01 [1] CRAN (R 4.5.0)
#>    fontLiberation      0.1.0      2016-10-15 [1] CRAN (R 4.5.0)
#>    fontquiver          0.2.1      2017-02-01 [1] CRAN (R 4.5.0)
#>    forcats           * 1.0.1      2025-09-25 [1] CRAN (R 4.5.0)
#>    foreach           * 1.5.2      2022-02-02 [1] CRAN (R 4.5.0)
#>    foreign             0.8-90     2025-03-31 [1] CRAN (R 4.5.0)
#>    Formula             1.2-5      2023-02-24 [1] CRAN (R 4.5.0)
#>    fs                  1.6.6      2025-04-12 [1] CRAN (R 4.5.0)
#>    furrr               0.3.1      2022-08-15 [1] CRAN (R 4.5.0)
#>    future            * 1.68.0     2025-11-17 [1] CRAN (R 4.5.2)
#>    future.apply      * 1.20.1     2025-12-09 [1] CRAN (R 4.5.2)
#>    gamlss            * 5.5-0      2025-08-19 [1] CRAN (R 4.5.0)
#>    gamlss.data       * 6.0-7      2025-09-04 [1] CRAN (R 4.5.0)
#>    gamlss.dist       * 6.1-1      2023-08-23 [1] CRAN (R 4.5.0)
#>    gdtools             0.4.4      2025-10-06 [1] CRAN (R 4.5.0)
#>    generics            0.1.4      2025-05-09 [1] CRAN (R 4.5.0)
#>    ggcorrplot        * 0.1.4.1    2023-09-05 [1] CRAN (R 4.5.0)
#>    ggdist              3.3.3      2025-04-23 [1] CRAN (R 4.5.0)
#>    ggplot2           * 4.0.1      2025-11-14 [1] CRAN (R 4.5.2)
#>    ggpubr              0.6.2      2025-10-17 [1] CRAN (R 4.5.0)
#>    ggsignif            0.6.4      2022-10-13 [1] CRAN (R 4.5.0)
#>    ggtext            * 0.1.2      2022-09-16 [1] CRAN (R 4.5.0)
#>    glmnet              4.1-10     2025-07-17 [1] CRAN (R 4.5.0)
#>    globals             0.18.0     2025-05-08 [1] CRAN (R 4.5.0)
#>    glue                1.8.0      2024-09-30 [1] CRAN (R 4.5.0)
#>  P graphics          * 4.5.2      2025-11-01 [1] local
#>  P grDevices         * 4.5.2      2025-11-01 [1] local
#>  P grid              * 4.5.2      2025-11-01 [1] local
#>    gridExtra           2.3        2017-09-09 [1] CRAN (R 4.5.0)
#>    gridtext            0.1.5      2022-09-16 [1] CRAN (R 4.5.0)
#>    gtable              0.3.6      2024-10-25 [1] CRAN (R 4.5.0)
#>    gtsummary         * 2.5.0      2025-12-05 [1] CRAN (R 4.5.2)
#>    here              * 1.0.2      2025-09-15 [1] CRAN (R 4.5.0)
#>    Hmisc             * 5.2-4      2025-10-05 [1] CRAN (R 4.5.0)
#>    hms                 1.1.4      2025-10-17 [1] CRAN (R 4.5.0)
#>    htmlTable           2.4.3      2024-07-21 [1] CRAN (R 4.5.0)
#>    htmltools         * 0.5.9      2025-12-04 [1] CRAN (R 4.5.2)
#>    htmlwidgets         1.6.4      2023-12-06 [1] CRAN (R 4.5.0)
#>    httr                1.4.7      2023-08-15 [1] CRAN (R 4.5.0)
#>    ImputeRobust      * 1.3-1      2018-11-30 [1] CRAN (R 4.5.0)
#>    inline              0.3.21     2025-01-09 [1] CRAN (R 4.5.0)
#>    insight             1.4.4      2025-12-06 [1] CRAN (R 4.5.2)
#>    iterators         * 1.0.14     2022-02-05 [1] CRAN (R 4.5.0)
#>    itertools           0.1-3      2014-03-12 [1] CRAN (R 4.5.0)
#>    jomo                2.7-6      2023-04-15 [1] CRAN (R 4.5.0)
#>    jsonlite            2.0.0      2025-03-27 [1] CRAN (R 4.5.0)
#>    kableExtra        * 1.4.0      2024-01-24 [1] CRAN (R 4.5.0)
#>    km.ci               0.5-6      2022-04-06 [1] CRAN (R 4.5.0)
#>    KMsurv              0.1-6      2025-05-20 [1] CRAN (R 4.5.0)
#>    knitr             * 1.51       2025-12-20 [1] CRAN (R 4.5.2)
#>    laeken              0.5.3      2024-01-25 [1] CRAN (R 4.5.0)
#>    latex2exp         * 0.9.6      2022-11-28 [1] CRAN (R 4.5.0)
#>    lattice           * 0.22-7     2025-04-02 [1] CRAN (R 4.5.0)
#>    lifecycle           1.0.4      2023-11-07 [1] CRAN (R 4.5.0)
#>    listenv             0.10.0     2025-11-02 [1] CRAN (R 4.5.0)
#>    lme4                1.1-38     2025-12-02 [1] CRAN (R 4.5.2)
#>    lmtest              0.9-40     2022-03-21 [1] CRAN (R 4.5.0)
#>    loo               * 2.9.0      2025-12-23 [1] CRAN (R 4.5.2)
#>    lubridate         * 1.9.4      2024-12-08 [1] CRAN (R 4.5.0)
#>    magick              2.9.0      2025-09-08 [1] CRAN (R 4.5.0)
#>    magrittr          * 2.0.4      2025-09-12 [1] CRAN (R 4.5.0)
#>    MASS              * 7.3-65     2025-02-28 [1] CRAN (R 4.5.0)
#>    mathjaxr            2.0-0      2025-12-01 [1] CRAN (R 4.5.2)
#>    Matrix            * 1.7-4      2025-08-28 [1] CRAN (R 4.5.0)
#>    MatrixModels        0.5-4      2025-03-26 [1] CRAN (R 4.5.0)
#>    matrixStats         1.5.0      2025-01-07 [1] CRAN (R 4.5.0)
#>    mcmc                0.9-8      2023-11-16 [1] CRAN (R 4.5.0)
#>    MCMCpack          * 1.7-1      2024-08-27 [1] CRAN (R 4.5.0)
#>    metadat             1.4-0      2025-02-04 [1] CRAN (R 4.5.0)
#>    metafor             4.8-0      2025-01-28 [1] CRAN (R 4.5.0)
#>  P methods           * 4.5.2      2025-11-01 [1] local
#>    mgcv              * 1.9-4      2025-11-07 [1] CRAN (R 4.5.0)
#>    mi                * 1.2        2025-09-02 [1] CRAN (R 4.5.0)
#>    mice              * 3.19.0     2025-12-10 [1] CRAN (R 4.5.2)
#>    miceadds          * 3.18-36    2025-09-12 [1] CRAN (R 4.5.0)
#>    miceFast          * 0.8.5      2025-02-03 [1] CRAN (R 4.5.0)
#>    minqa               1.2.8      2024-08-17 [1] CRAN (R 4.5.0)
#>    missForest        * 1.6.1      2025-10-26 [1] CRAN (R 4.5.0)
#>    mitml             * 0.4-5      2023-03-08 [1] CRAN (R 4.5.0)
#>    mitools             2.4        2019-04-26 [1] CRAN (R 4.5.0)
#>    multcomp            1.4-29     2025-10-20 [1] CRAN (R 4.5.0)
#>    mvtnorm           * 1.3-3      2025-01-10 [1] CRAN (R 4.5.0)
#>    nlme              * 3.1-168    2025-03-31 [1] CRAN (R 4.5.0)
#>    nloptr              2.2.1      2025-03-17 [1] CRAN (R 4.5.0)
#>    nnet                7.3-20     2025-01-01 [1] CRAN (R 4.5.0)
#>    numDeriv            2016.8-1.1 2019-06-06 [1] CRAN (R 4.5.0)
#>    officer             0.7.2      2025-12-04 [1] CRAN (R 4.5.2)
#>    opdisDownsampling   1.0.1      2024-04-15 [1] CRAN (R 4.5.0)
#>    openssl             2.3.4      2025-09-30 [1] CRAN (R 4.5.0)
#>    otel                0.2.0      2025-08-29 [1] CRAN (R 4.5.0)
#>    pan                 1.9        2023-12-07 [1] CRAN (R 4.5.0)
#>    pander              0.6.6      2025-03-01 [1] CRAN (R 4.5.0)
#>  P parallel          * 4.5.2      2025-11-01 [1] local
#>    parallelly        * 1.46.0     2025-12-12 [1] CRAN (R 4.5.2)
#>    pbmcapply         * 1.5.1      2022-04-28 [1] CRAN (R 4.5.0)
#>    performance       * 0.15.3     2025-12-01 [1] CRAN (R 4.5.2)
#>    pillar              1.11.1     2025-09-17 [1] CRAN (R 4.5.0)
#>    pkgbuild            1.4.8      2025-05-26 [1] CRAN (R 4.5.0)
#>    pkgconfig           2.0.3      2019-09-22 [1] CRAN (R 4.5.0)
#>    plyr                1.8.9      2023-10-02 [1] CRAN (R 4.5.0)
#>    png                 0.1-8      2022-11-29 [1] CRAN (R 4.5.0)
#>    polspline           1.1.25     2024-05-10 [1] CRAN (R 4.5.0)
#>    posterior         * 1.6.1      2025-02-27 [1] CRAN (R 4.5.0)
#>    pracma              2.4.6      2025-10-22 [1] CRAN (R 4.5.0)
#>    prettyunits         1.2.0      2023-09-24 [1] CRAN (R 4.5.0)
#>    ProfileLikelihood * 1.3        2023-08-25 [1] CRAN (R 4.5.0)
#>    progress          * 1.2.3      2023-12-06 [1] CRAN (R 4.5.0)
#>    proxy               0.4-29     2025-12-29 [1] CRAN (R 4.5.2)
#>    pryr                0.1.6      2023-01-17 [1] CRAN (R 4.5.0)
#>    purrr             * 1.2.0      2025-11-04 [1] CRAN (R 4.5.0)
#>    qqconf              1.3.2      2023-04-14 [1] CRAN (R 4.5.0)
#>    qqplotr           * 0.0.7      2025-09-05 [1] CRAN (R 4.5.0)
#>    quantreg          * 6.1        2025-03-10 [1] CRAN (R 4.5.0)
#>    QuickJSR            1.8.1      2025-09-20 [1] CRAN (R 4.5.0)
#>    R6                  2.6.1      2025-02-15 [1] CRAN (R 4.5.0)
#>    ragg                1.5.0      2025-09-02 [1] CRAN (R 4.5.0)
#>    randomForest      * 4.7-1.2    2024-09-22 [1] CRAN (R 4.5.0)
#>    ranger              0.17.0     2024-11-08 [1] CRAN (R 4.5.0)
#>    rappdirs            0.3.3      2021-01-31 [1] CRAN (R 4.5.0)
#>    rapportools         1.2        2025-02-28 [1] CRAN (R 4.5.0)
#>    rbibutils           2.4        2025-11-07 [1] CRAN (R 4.5.0)
#>    RColorBrewer        1.1-3      2022-04-03 [1] CRAN (R 4.5.0)
#>    Rcpp              * 1.1.0      2025-07-02 [1] CRAN (R 4.5.0)
#>    RcppParallel        5.1.11-1   2025-08-27 [1] CRAN (R 4.5.0)
#>    Rdpack              2.6.4      2025-04-09 [1] CRAN (R 4.5.0)
#>    readr             * 2.1.6      2025-11-14 [1] CRAN (R 4.5.2)
#>    reformulas          0.4.3      2025-12-17 [1] CRAN (R 4.5.2)
#>    rematch2            2.1.2      2020-05-01 [1] CRAN (R 4.5.0)
#>    reshape2          * 1.4.5      2025-11-12 [1] CRAN (R 4.5.0)
#>    reticulate        * 1.44.1     2025-11-14 [1] CRAN (R 4.5.2)
#>    rlang               1.1.6      2025-04-11 [1] CRAN (R 4.5.0)
#>    rmarkdown         * 2.30       2025-09-28 [1] CRAN (R 4.5.0)
#>    rms               * 8.1-0      2025-10-14 [1] CRAN (R 4.5.0)
#>    rngtools            1.5.2      2021-09-20 [1] CRAN (R 4.5.0)
#>    robustbase          0.99-6     2025-09-04 [1] CRAN (R 4.5.0)
#>    rpact             * 4.3.0      2025-12-16 [1] CRAN (R 4.5.2)
#>    rpart               4.1.24     2025-01-07 [1] CRAN (R 4.5.0)
#>    rprojroot           2.1.1      2025-08-26 [1] CRAN (R 4.5.0)
#>    rstan             * 2.32.7     2025-03-10 [1] CRAN (R 4.5.0)
#>    rstantools          2.5.0      2025-09-01 [1] CRAN (R 4.5.0)
#>    rstatix             0.7.3      2025-10-18 [1] CRAN (R 4.5.0)
#>    rstudioapi          0.17.1     2024-10-22 [1] CRAN (R 4.5.0)
#>    S7                  0.2.1      2025-11-14 [1] CRAN (R 4.5.2)
#>    sandwich            3.1-1      2024-09-15 [1] CRAN (R 4.5.0)
#>    scales              1.4.0      2025-04-24 [1] CRAN (R 4.5.0)
#>    sessioninfo         1.2.3      2025-02-05 [1] CRAN (R 4.5.0)
#>    shape               1.4.6.1    2024-02-23 [1] CRAN (R 4.5.0)
#>    showtext          * 0.9-7      2024-03-02 [1] CRAN (R 4.5.0)
#>    showtextdb        * 3.0        2020-06-04 [1] CRAN (R 4.5.0)
#>    sp                  2.2-0      2025-02-01 [1] CRAN (R 4.5.0)
#>    SparseM           * 1.84-2     2024-07-17 [1] CRAN (R 4.5.0)
#>  P splines           * 4.5.2      2025-11-01 [1] local
#>    StanHeaders       * 2.32.10    2024-07-15 [1] CRAN (R 4.5.0)
#>    Statamarkdown     * 0.9.6      2026-01-06 [1] Github (Hemken/Statamarkdown@dc936d8)
#>  P stats             * 4.5.2      2025-11-01 [1] local
#>  P stats4            * 4.5.2      2025-11-01 [1] local
#>    stringi             1.8.7      2025-03-27 [1] CRAN (R 4.5.0)
#>    stringr           * 1.6.0      2025-11-04 [1] CRAN (R 4.5.0)
#>    summarytools      * 1.1.4      2025-04-29 [1] CRAN (R 4.5.0)
#>    survival            3.8-3      2024-12-17 [1] CRAN (R 4.5.0)
#>    survminer           0.5.1      2025-09-02 [1] CRAN (R 4.5.0)
#>    survMisc            0.5.6      2022-04-07 [1] CRAN (R 4.5.0)
#>    svglite           * 2.2.2      2025-10-21 [1] CRAN (R 4.5.0)
#>    svgPanZoom          0.3.4      2020-02-15 [1] CRAN (R 4.5.0)
#>    svUnit              1.0.8      2025-08-26 [1] CRAN (R 4.5.0)
#>    sysfonts          * 0.8.9      2024-03-02 [1] CRAN (R 4.5.0)
#>    systemfonts         1.3.1      2025-10-01 [1] CRAN (R 4.5.0)
#>  P tcltk               4.5.2      2025-11-01 [1] local
#>    tensorA             0.36.2.1   2023-12-13 [1] CRAN (R 4.5.0)
#>    texPreview        * 2.1.0      2024-01-24 [1] CRAN (R 4.5.0)
#>    textshaping         1.0.4      2025-10-10 [1] CRAN (R 4.5.0)
#>    TH.data             1.1-5      2025-11-17 [1] CRAN (R 4.5.2)
#>    tibble            * 3.3.0      2025-06-08 [1] CRAN (R 4.5.0)
#>    tidybayes         * 3.0.7      2024-09-15 [1] CRAN (R 4.5.0)
#>    tidyr             * 1.3.2      2025-12-19 [1] CRAN (R 4.5.2)
#>    tidyselect          1.2.1      2024-03-11 [1] CRAN (R 4.5.0)
#>    tidyverse         * 2.0.0      2023-02-22 [1] CRAN (R 4.5.0)
#>    timechange          0.3.0      2024-01-18 [1] CRAN (R 4.5.0)
#>    tinytex           * 0.58       2025-11-19 [1] CRAN (R 4.5.2)
#>  P tools               4.5.2      2025-11-01 [1] local
#>    twosamples          2.0.1      2023-06-23 [1] CRAN (R 4.5.0)
#>    tzdb                0.5.0      2025-03-15 [1] CRAN (R 4.5.0)
#>  P utils             * 4.5.2      2025-11-01 [1] local
#>    uuid                1.2-1      2024-07-29 [1] CRAN (R 4.5.0)
#>    V8                  8.0.1      2025-10-10 [1] CRAN (R 4.5.0)
#>    vcd                 1.4-13     2024-09-16 [1] CRAN (R 4.5.0)
#>    vctrs               0.6.5      2023-12-01 [1] CRAN (R 4.5.0)
#>    VIM               * 6.2.6      2025-09-18 [1] CRAN (R 4.5.0)
#>    viridisLite         0.4.2      2023-05-02 [1] CRAN (R 4.5.0)
#>    wesanderson       * 0.3.7      2023-10-31 [1] CRAN (R 4.5.0)
#>    whisker             0.4.1      2022-12-05 [1] CRAN (R 4.5.0)
#>    withr               3.0.2      2024-10-28 [1] CRAN (R 4.5.0)
#>    xfun              * 0.55       2025-12-16 [1] CRAN (R 4.5.2)
#>    xml2                1.5.1      2025-12-01 [1] CRAN (R 4.5.2)
#>    xtable              1.8-4      2019-04-21 [1] CRAN (R 4.5.0)
#>    yaml                2.3.12     2025-12-10 [1] CRAN (R 4.5.2)
#>    yardstick         * 1.3.2      2025-01-22 [1] CRAN (R 4.5.0)
#>    zip                 2.3.3      2025-05-13 [1] CRAN (R 4.5.0)
#>    zoo                 1.8-15     2025-12-15 [1] CRAN (R 4.5.2)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#> 
#>  * ── Packages attached to the search path.
#>  P ── Loaded and on-disk path mismatch.
#> 
#> ─ External software ────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting        value
#>  cairo          1.17.6
#>  cairoFT
#>  pango          1.50.14
#>  png            1.6.44
#>  jpeg           9.5
#>  tiff           LIBTIFF, Version 4.5.0
#>  tcl            8.6.13
#>  curl           8.7.1
#>  zlib           1.2.12
#>  bzlib          1.0.8, 13-Jul-2019
#>  xz             5.6.3
#>  deflate        1.23
#>  PCRE           10.44 2024-06-07
#>  ICU            76.1
#>  TRE            TRE 0.8.0 R_fixes (BSD)
#>  iconv          Apple or GNU libiconv 1.11 /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libR.dylib
#>  readline       5.2
#>  BLAS           /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
#>  lapack         /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib
#>  lapack_version 3.12.1
#> 
#> ─ Python configuration ─────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  Python is not available
#> 
#> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#> $RNGkind
#> [1] "L'Ecuyer-CMRG" "Inversion"     "Rejection"

Article Citation

References

1. Wassmer G, Pahlke F. (2018). “Rpact: Confirmatory adaptive clinical trial design and analysis.” doi: 10.32614/cran.package.rpact. http://dx.doi.org/10.32614/cran.package.rpact.

Citation

BibTeX citation:
@misc{panda2021,
  author = {Panda, Sir and Rafi, Zad},
  title = {Simulation of a {Two-Group} {Parallel-Arm} {RCT} with
    {Interim} {Analyses}},
  date = {2021-02-01},
  url = {https://lesslikely.com/posts/statistics/interim-analysis},
  langid = {en},
  abstract = {A simulation of a two-group parallel-arm randomized trial
    with interim analysis using the rpact package.}
}
For attribution, please cite this work as:
1. Panda S, Rafi Z. (2021). ‘Simulation of a Two-Group Parallel-Arm RCT with Interim Analyses’. Less Likely. https://lesslikely.com/posts/statistics/interim-analysis.