Skip to content

Inconsistent result on probabilities of stopping for futility when all populations are not selected in getSimulationEnrichmentRates() for rpact version 3.4.0 and 3.5.0 #17

Closed
@fpahlke

Description

@fpahlke

We are working on a three-stage design for binary outcomes with adaptation of populations at the first interim using rpact. The OBF alpha spending function is used for efficacy. We consider two population selection, and the futility only happens when none of the population could meet the selection criteria. We implement this futility criteria in a customized population selection function for getSimulationEnrichmentRates().

We were working on rpact 3.4.0 (R version 4.1.0) and the simulation results look reasonable. However, when we are using the latest version (3.5.0), the futility probabilities at the first interim becomes zero for all simulation scenarios. We attached the code for a simplified version of our design for illustration. We developed the selection criteria using predictive probabilities for our project, but for this simplified one we only use the effect estimates, which requires at least 25% reduction from the assumed placebo rate (10%). The results are

Futility stop per stage [1]: 0.0820, 0.1050, 0.4650 (version 3.4.0)
Futility stop per stage [1]: 0.0000, 0.0000, 0.0000 (version 3.5.0)

Could you please help us to figure out what is going wrong?

Example:

library(rpact)

# Define design
ind <- getDesignInverseNormal(  
  kMax = 3,
  alpha = 0.025, 
  beta = 0.1, 
  sided = 1, 
  informationRates = c(530, 706, 1176)/1176,
  #futilityBounds = c(0, 1),
  typeOfDesign = "asOF", 
  typeBetaSpending = "none")

getPowerRates(
  design = ind,
  groups = 2,
  riskRatio = FALSE,
  thetaH0 = 0,
  pi1 = 10/100*0.5,
  pi2 = 10/100,
  directionUpper = FALSE,
  maxNumberOfSubjects = 1176,
  allocationRatioPlanned = 1) |> summary()

# Define selection function
mySelection <- function(effectVector, stage) {
  selectedPopulations <- rep(TRUE, 2)
  if (stage == 1) {
    selectedPopulations <- rep(FALSE, 2) 
    if (effectVector[2] / 0.1 >= 0.25)  
      selectedPopulations[2] = TRUE 
    else if (effectVector[1] / 0.1 >= 0.25) 
      selectedPopulations[1] = TRUE 
  }
  return(selectedPopulations)
}

# Perform simulation
simResults <- getSimulationEnrichmentRates(
  design = ind,
  effectList = list(
    subGroups = c("S", "R"),  
    prevalences = c(0.5, 0.5),
    piControl = rep(10/100, 2), 
    piTreatments = matrix(
      c( 5/100, 5/100,
         5/100, 5/100,
        10/100, 5/100), ncol = 2, byrow = TRUE)),
  intersectionTest = "Simes",
  stratifiedAnalysis = FALSE, 
  directionUpper = FALSE,
  typeOfSelection = "userDefined", 
  effectMeasure = "effectEstimate",
  successCriterion = "all",
  plannedSubjects = c(530, 706, 1176),
  maxNumberOfIterations = 1000,
  seed = 1234,
  selectPopulationsFunction = mySelection)

print(simResults)

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions