helper function for sim_test_data_study()

sim_test_data_patient(
.f_sample_max_visit = function() rnorm(1, mean = 20, sd = 4),
.f_sample_ae_per_visit = function(max_visit) rpois(max_visit, 0.5)
)

## Arguments

.f_sample_max_visit function used to sample the maximum number of aes, Default: function() rnorm(1, mean = 20, sd = 4) function used to sample the aes for each visit, Default: function(x) rpois(x, 0.5)

## Value

vector containing cumulative aes

""

## Examples

replicate(5, sim_test_data_patient())
#> [[1]]
#>  [1] 1 1 2 2 2 2 2 2 4 4 5 5 6 6
#>
#> [[2]]
#>  [1]  0  0  1  2  3  4  4  4  4  5  6  6  6  7  8  9  9 10
#>
#> [[3]]
#>  [1] 0 1 3 3 4 4 6 6 7 7 8 8 8 9 9 9 9 9 9
#>
#> [[4]]
#>  [1] 2 2 2 2 2 2 2 2 4 5 5 5 5 6 6 7 7
#>
#> [[5]]
#>  [1]  0  0  1  2  3  3  4  4  4  5  6  6  6  7  7 10 10 10 10
#> replicate(5, sim_test_data_patient(
.f_sample_ae_per_visit = function(x) rpois(x, 1.2))
)
#> [[1]]
#>  [1]  1  2  5 10 13 15 16 16 17 18 18 18 21 22 22 24 25 25 25 26 28 29
#>
#> [[2]]
#>  [1]  3  4  5  7  8  9 10 11 14 14 16 17 18 20 22 22 23 25 26 29 32
#>
#> [[3]]
#>  [1]  0  1  3  4  7  7  8  8 11 15 18 22 23 23 24 26 26 27 28 29 31 33 34 36 37
#>
#> [[4]]
#>  [1]  1  1  5  7  7  8  9 10 11 12 14 15 16 18 19 20 21 22 22 23 25 25 28
#>
#> [[5]]
#>  [1]  1  2  3  4  5  6  8 11 12 13 13 14 15 15 15 18 19 20 22 24 27 28 28
#> replicate(5, sim_test_data_patient(
.f_sample_max_visit = function() rnorm(1, mean = 5, sd = 5))
)
#> [[1]]
#> [1] 1 2 3 4 4 5 5
#>
#> [[2]]
#> [1] 0 0 0 0
#>
#> [[3]]
#> [1] 0 1 1 2 2 2 3 3
#>
#> [[4]]
#> [1] 0 1 1 1 1
#>
#> [[5]]
#> [1] 0
#>