Skip to contents

Simulate disease progress data under the Gompertz epidemic model, with optional replicated observations.

Usage

sim_gompertz(N = 10, dt = 1, y0 = 0.01, r, K = 1, n, alpha = 0.2)

Arguments

N

Total epidemic duration.

dt

Time interval between assessments.

y0

Initial disease intensity.

r

Apparent infection rate.

K

Maximum disease intensity.

n

Number of replicated curves.

alpha

Noise level applied to replicated observations.

Value

A data frame with simulated disease progress values and replicated noisy observations.

Examples

sim_gompertz(N = 30, dt = 5, y0 = 0.01, r = 0.05, K = 1, n = 4)
#>    replicates time          y   random_y
#> 1           1    0 0.01000000 0.01117601
#> 2           1    5 0.02769670 0.02948994
#> 3           1   10 0.06122895 0.07345034
#> 4           1   15 0.11357204 0.10744739
#> 5           1   20 0.18375599 0.19485579
#> 6           1   25 0.26729526 0.27775744
#> 7           1   30 0.35788386 0.33294932
#> 8           2    0 0.01000000 0.01239158
#> 9           2    5 0.02769670 0.03394653
#> 10          2   10 0.06122895 0.06927860
#> 11          2   15 0.11357204 0.14552244
#> 12          2   20 0.18375599 0.20050943
#> 13          2   25 0.26729526 0.21729152
#> 14          2   30 0.35788386 0.33153624
#> 15          3    0 0.01000000 0.01000000
#> 16          3    5 0.02769670 0.02514700
#> 17          3   10 0.06122895 0.05409722
#> 18          3   15 0.11357204 0.11442003
#> 19          3   20 0.18375599 0.15643021
#> 20          3   25 0.26729526 0.27348520
#> 21          3   30 0.35788386 0.32779876
#> 22          4    0 0.01000000 0.01349923
#> 23          4    5 0.02769670 0.03155682
#> 24          4   10 0.06122895 0.07169231
#> 25          4   15 0.11357204 0.12130749
#> 26          4   20 0.18375599 0.23421781
#> 27          4   25 0.26729526 0.24239365
#> 28          4   30 0.35788386 0.33666639