Skip to content

FA analysis time is larger than expected after applying to_integer #627

@LittleBeannie

Description

@LittleBeannie
# Enrollment
enroll_rate <- define_enroll_rate(duration = diff(c(0, 2, 4, 6, 16)), rate = c(1, 2, 3, 5), stratum = "All")

# Failure rates
duration <- diff(c(0, c(4, 12, 20)))
control_rate <- s2pwe(times = c(4, 12, 20), survival = c(0.8, 0.6, 0.5))$rate
fail_rate <- define_fail_rate(duration, fail_rate = control_rate, dropout_rate = c(0.001, 0.001, 0.001), hr = c(1, 0.6, 0.6), stratum = "All")

# Design
x <- gs_design_ahr(
  enroll_rate = enroll_rate,
  fail_rate = fail_rate,
  alpha = 0.025,
  beta = 0.1,
  analysis_time = c(12, 18, 24, 34),
  ratio = 1,
  binding = FALSE,
  upper = "gs_spending_bound",
  upar = list(sf = "sfLDOF", total_spend = 0.025, param = NULL),
  lower = "gs_b",
  lpar = c(-Inf, -Inf, -Inf, -Inf),
  h1_spending = TRUE,
  test_lower = FALSE,
  info_scale = "h0_info"
) 

The original design x with sample size of 1043.46 has a planned final analysis at 34 months.

The integer-rounded design from to_integer(x) with sample size of 1044 gives a final analysis time of about 39 months.

This is not reasonable and we conduct the following investigation to understand the root cause of this issue, and to explore potential solutions.

Short answer: The issue is caused by the original fail_rate having all finite durations.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions