Get the length of time that trials take to recruit all patients.

trial_duration(x, ...)

Arguments

x

Object of type simulations.

...

arguments passed to other methods

Value

vector of numerical times

Examples

true_prob_tox <- c(0.12, 0.27, 0.44, 0.53, 0.57)
sims <- get_three_plus_three(num_doses = 5) %>%
  simulate_trials(num_sims = 50, true_prob_tox = true_prob_tox)
sims %>% trial_duration
#>  [1]  6.838589 12.503946 12.520255  9.527787  8.044764  8.332019  4.910881
#>  [8]  8.821789 11.891420  6.283198 12.927981 12.931301 12.537634 13.753100
#> [15]  7.225603  6.184396  6.770635  9.117960 16.424111  9.633014  8.769944
#> [22]  9.951923  2.561204 23.452561  2.762147 18.506245  9.480204 13.364694
#> [29]  4.291953  9.414567  2.963298  8.521997 10.073196  2.698001 12.293870
#> [36] 14.355047  1.624640  7.708667  4.142992  6.450473  4.333914 10.247811
#> [43]  2.386275 12.035586  7.783271  7.198992 17.240859 12.682162 10.470924
#> [50]  4.360188