Create a list of delay distributions to run the ringbp model
Arguments
- incubation_period
a
function
: a random number generatingfunction
that samples from incubation period distribution, thefunction
accepts a singleinteger
argument specifying the number of times to sample the incubation period (i.e. length of thefunction
output).- onset_to_isolation
a
function
: a random number generatingfunction
that accepts a singleinteger
argument specifying the length of thefunction
output.- latent_period
a non-negative
numeric
scalar: the minimum time between an individual being exposed and becoming infectious. It is a population-wide parameter, with no variability between individuals. It sets the minimum generation time in the model. Default is 0 (i.e. an individual becomes immediately infectious after being infected).If
latent_period
is positive then generation times are sampled conditional ongt >= latent_period
(i.e. left-truncated atlatent_period
). This may reduce the realised proportion of presymptomatic transmission, depending on theincubation_period
distribution andpresymptomatic_transmission
(inevent_prob_opts()
).
Examples
delay_opts(
incubation_period = \(n) rweibull(n = n, shape = 2.32, scale = 6.49),
onset_to_isolation = \(n) rweibull(n = n, shape = 1.65, scale = 4.28)
)
#> $incubation_period
#> function (n)
#> rweibull(n = n, shape = 2.32, scale = 6.49)
#> <environment: 0x564fbae1adf0>
#>
#> $onset_to_isolation
#> function (n)
#> rweibull(n = n, shape = 1.65, scale = 4.28)
#> <environment: 0x564fbae1adf0>
#>
#> $latent_period
#> [1] 0
#>
#> attr(,"class")
#> [1] "ringbp_delay_opts"