Generates one or more discrete infectivity profiles based on discretised gamma distributions.

discreteGammaInfectivityProfile(mean, sd, names = NULL, range = 20)

Arguments

mean

- the mean(s) of the gamma distributions

sd

- the sd(s) of the gamma distribution

names

- the names of the infectivity profiles, if they represent a specific variant for example, if omitted they will be numbered

range

- the number of days to generate - the first time point is always zero, so the resulting length will be one greater than this value.

Value

a list of class infectivity_profile containing aVector, the end points of the period, and yMatrix the discrete probabilities in the period up to the relevant aVector entry. Each column in yMatrix is a infectivity profile

Examples

discreteGammaInfectivityProfile(c(4,3),c(5,4),names=c("delta","omicron"),range=20)
#> $aVector #> [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #> #> $yMatrix #> delta omicron #> [1,] 0.000000000 0.000000000 #> [2,] 0.329687918 0.413455466 #> [3,] 0.154623126 0.159937965 #> [4,] 0.108810136 0.105001564 #> [5,] 0.081963970 0.074916152 #> [6,] 0.063741286 0.055568962 #> [7,] 0.050504384 0.042166332 #> [8,] 0.040511797 0.032479087 #> [9,] 0.032781275 0.025284565 #> [10,] 0.026699443 0.019840479 #> [11,] 0.021856218 0.015664637 #> [12,] 0.017963935 0.012428569 #> [13,] 0.014813600 0.009900660 #> [14,] 0.012249329 0.007913292 #> [15,] 0.010152481 0.006342728 #> [16,] 0.008431320 0.005096181 #> [17,] 0.007014020 0.004103204 #> [18,] 0.005843763 0.003309760 #> [19,] 0.004875230 0.002674062 #> [20,] 0.004072025 0.002163564 #> [21,] 0.003404743 0.001752772 #> #> $mean #> [1] 4 3 #> #> $sd #> [1] 5 4 #> #> attr(,"class") #> [1] "infectivity_profile"