Skip to content

Can we decide the analysis timing by minimal total sample and minimum follow-up time after the minimal total sample size is reached in gsSurvPower()? #296

Description

@LittleBeannie

Example Used

The following example assumes the total sample size is 500 with a randomization ratio of 3:2 (experimental:control). It is a efficacy only design. The median of control arm is 15 months and HR is 0.7. The enrollment is 12 months with a ramp-up during the first 6 months. There are 3 analyses in total (2 interim analyses and 1 final analyses) which is decided by minimal total sample size of 300 (IA1), 500(IA2) and 500(FA). Furthermore, we require minimal follow-up time of 6 months after these minimal total sample sizes are reached.

We use gsSurvPower() to calculate the power.

gsSurvPower(
  k = 3,
  test.type = 1,
  alpha = 0.025,
  sided = 1,
  astar = 0,
  sfu = gsDesign::sfLDOF,
  sfupar = NULL,
  sfl = gsDesign::sfHSD,
  sflpar = -2,
  sfharm = gsDesign::sfHSD,
  sfharmparam = -2,
  spending = "information",
  # treatment effect
  S = NULL,
  lambdaC = log(2)/15,
  hr = 0.7,
  hr0 = 1,
  # dropout
  eta = 0.001,
  etaE = NULL,
  # sample size is 500, which is a multiplier of 5
  gamma = c(1, 2, 3, 4) * 500 / sum(c(1, 2, 3, 4) * c(2, 2, 2, 6)), 
  R = c(2, 2, 2, 6),
  # analysis timing
  minN = c(300, 500, 500),
  minFollowUp = c(6, 6, 6),
  # randomization ratio is 3:2 (experimental:control)
  ratio = 1.5,
  testUpper = TRUE,
  testLower = FALSE,
  testHarm = FALSE,
  method = "LachinFoulkes")

Issues

The above code generate the following error message. Does it indicate that we are required to use minN and minFollowUp along with either plannedCalendarTime or targetEvents? If so, shall we update our documentation in the help page?

Error in .gsSurvPower_resolve_timing_inputs(default_k = k, plannedCalendarTime = plannedCalendarTime,  : 
  At least one of plannedCalendarTime or targetEvents must be specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions