helper function for sim_test_data_study()
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)
vector containing cumulative aes
""
replicate(5, sim_test_data_patient())
#> [[1]]
#> [1] 0 0 0 0 1 1 1 3 4 5 6 6 7 7 8 10 10 11 12 14 14
#>
#> [[2]]
#> [1] 1 1 1 2 2 2 3 3 4 5 5 7 7 7 7 7 7 7 8 8 9 9 11 13
#>
#> [[3]]
#> [1] 0 1 2 4 4 4 5 5 6 7 7 8 8 8 8 8 8 8 8 8 8 9
#>
#> [[4]]
#> [1] 0 0 0 1 2 2 2 2 2 3 3 4 4 4 4 4 4 5 5 7 7 7 7
#>
#> [[5]]
#> [1] 1 1 1 2 3 5 6 6 6 6 6 7 7 8 9 9 9 9 10 10 10 12 13 13 14
#> [26] 14 15
#>
replicate(5, sim_test_data_patient(
.f_sample_ae_per_visit = function(x) rpois(x, 1.2))
)
#> [[1]]
#> [1] 1 2 2 2 6 7 7 9 9 9 11 13 14 14 16 20 21 21 22 23 25
#>
#> [[2]]
#> [1] 0 1 1 1 1 3 6 7 9 11 12 14 14 15 17 19
#>
#> [[3]]
#> [1] 0 1 4 4 6 8 9 9 13 13 14 15 16 20 20 24 25 26 28 29 31 33 35
#>
#> [[4]]
#> [1] 1 5 5 9 11 13 15 15 16 16 17 18 18 18 19 19 20 20 20 20 22 24 26 28 30
#> [26] 31
#>
#> [[5]]
#> [1] 1 2 4 5 8 9 12 13 13 13 17 19 20 20 20 20
#>
replicate(5, sim_test_data_patient(
.f_sample_max_visit = function() rnorm(1, mean = 5, sd = 5))
)
#> [[1]]
#> [1] 0 3
#>
#> [[2]]
#> [1] 0
#>
#> [[3]]
#> [1] 0 0 0 0 3 3 4 4
#>
#> [[4]]
#> [1] 0 0 0 0 0 0 0 1 1
#>
#> [[5]]
#> [1] 0 2
#>