Skip to contents

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

Usage

sim_logistic(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_logistic(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.01283592
#> 2           1    5 0.01280525 0.01116012
#> 3           1   10 0.01638399 0.01571557
#> 4           1   15 0.02094122 0.01933049
#> 5           1   20 0.02673115 0.02506613
#> 6           1   25 0.03406581 0.03222894
#> 7           1   30 0.04332302 0.04741946
#> 8           2    0 0.01000000 0.01000000
#> 9           2    5 0.01280525 0.01152606
#> 10          2   10 0.01638399 0.02071275
#> 11          2   15 0.02094122 0.02006133
#> 12          2   20 0.02673115 0.02579686
#> 13          2   25 0.03406581 0.03340644
#> 14          2   30 0.04332302 0.04923047
#> 15          3    0 0.01000000 0.01000000
#> 16          3    5 0.01280525 0.01271010
#> 17          3   10 0.01638399 0.01418692
#> 18          3   15 0.02094122 0.01961153
#> 19          3   20 0.02673115 0.02704419
#> 20          3   25 0.03406581 0.03019025
#> 21          3   30 0.04332302 0.04772871
#> 22          4    0 0.01000000 0.01000000
#> 23          4    5 0.01280525 0.01358031
#> 24          4   10 0.01638399 0.01143184
#> 25          4   15 0.02094122 0.01970705
#> 26          4   20 0.02673115 0.02398235
#> 27          4   25 0.03406581 0.02977433
#> 28          4   30 0.04332302 0.04285139