Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug of gs_design_ahr for information fraction driven design with number of analyses >= 4 #358

Closed
LittleBeannie opened this issue Mar 12, 2024 · 0 comments · Fixed by #359
Assignees
Labels
bug Something isn't working

Comments

@LittleBeannie
Copy link
Collaborator

LittleBeannie commented Mar 12, 2024

The following code give error message:

library(gsDesign2)

gs_design_ahr(
  enroll_rate = define_enroll_rate(
    duration = c(2, 2, 2, 18), rate = 1:4
  ),
  fail_rate = define_fail_rate(
    duration = c(3, 100), fail_rate = log(2) / c(9, 18), hr =
      c(0.9, 0.6), dropout_rate = 0.001
  ),
  alpha = 0.025,
  beta = 0.1,
  info_frac = c(0.4, 0.6, 0.9, 1),
  analysis_time = 60,
  ratio = 1,
  binding = FALSE,
  upper = gs_spending_bound,
  upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
  lower = gs_spending_bound,
  lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.1, param = NULL, timing = NULL),
  h1_spending = TRUE,
  test_upper = TRUE,
  test_lower = TRUE,
  info_scale = "h0_h1_info",
  r = 18,
  tol = 1e-06
)
Error in if (!is.numeric(lower) || !is.numeric(upper) || lower >= upper) stop("lower < upper  is not fulfilled") : 
  missing value where TRUE/FALSE needed
Error in expected_time(enroll_rate = enroll_rate, fail_rate = fail_rate,  : 
  expected_time(): solution not found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant