Sample times between patient arrivals using the exponential distribution.

cohorts_of_n(n = 3, mean_time_delta = 1)

Arguments

n

integer, sample arrival times for this many patients.

mean_time_delta

the average gap between patient arrival times. I.e. the reciprocal of the rate parameter in an Exponential distribution.

Value

data.frame with column time_delta containing durations of time between patient arrivals.

Examples

cohorts_of_n()
#>   time_delta
#> 1  0.5622451
#> 2  0.8460959
#> 3  0.2049983
cohorts_of_n(n = 10, mean_time_delta = 5)
#>    time_delta
#> 1   0.8983756
#> 2   2.5915838
#> 3   3.3607531
#> 4   2.6281947
#> 5   6.8111344
#> 6   7.4544654
#> 7  11.8648046
#> 8   1.5598263
#> 9   1.0200386
#> 10  1.5699583