Skip to contents

Sample times between patient arrivals using the exponential distribution.

Usage

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  1.4908931
#> 2  2.3729609
#> 3  0.3119653
cohorts_of_n(n = 10, mean_time_delta = 5)
#>    time_delta
#> 1   1.0200386
#> 2   1.5699583
#> 3   5.0520792
#> 4   2.4786463
#> 5   8.2815979
#> 6  16.2331258
#> 7   1.1691456
#> 8   0.9847499
#> 9   6.6028085
#> 10  1.7941463