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

Zero failure rates #360

Closed
LittleBeannie opened this issue Mar 15, 2024 · 0 comments · Fixed by #361
Closed

Zero failure rates #360

LittleBeannie opened this issue Mar 15, 2024 · 0 comments · Fixed by #361
Assignees

Comments

@LittleBeannie
Copy link
Collaborator

LittleBeannie commented Mar 15, 2024

The following code gives NaN hr:

library(gsDesign2)

pw_info(
  enroll_rate = define_enroll_rate(duration = c(2, 10), rate = c(5, 20)),
  fail_rate = define_fail_rate(duration = c(6, 24, Inf), fail_rate = c(0.001, 0.05, 0), dropout_rate = 0.0001),
  total_duration = 40,
  ratio = 1
)
#>   time stratum  t  hr    event    info   info0
#> 1   40     All  0   1 146.2816 36.5704 36.5704
#> 2   40     All 30 NaN   0.0000  0.0000  0.0000

The solution is to get rid of the time duration with 0 events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant