Returns generation time parameters in a format for lower level model use. The
generation time can either be given as a disease
and source
to
be passed to get_generation_time, or as parameters of a distribution to be
passed to dist_spec.
Usage
generation_time_opts(
dist = dist_spec(mean = 1),
...,
disease,
source,
max = 15L,
fixed = FALSE,
prior_weight
)
Arguments
- dist
A delay distribution or series of delay distributions generated using
dist_spec()
orget_generation_time()
. If no distribution is given a fixed generation time of 1 will be assumed.- ...
deprecated; use
dist
instead- disease
deprecated; use
dist
instead- source
deprecated; use
dist
instead- max
deprecated; use
dist
instead- fixed
deprecated; use
dist
instead- prior_weight
deprecated; prior weights are now specified as a model option. Use the
weigh_delay_priors
argument ofestimate_infections
instead.
Examples
# default settings with a fixed generation time of 1
generation_time_opts()
#>
#> Fixed distribution with PMF [0 1]
#>
# A fixed gamma distributed generation time
generation_time_opts(dist_spec(mean = 3, sd = 2, max = 15))
#>
#> Fixed distribution with PMF [0.15 0.13 0.11 0.088 0.076 0.067 0.059 0.053 0.048 0.044 0.041 0.038 0.035 0.033 0.031]
#>
# An uncertain gamma distributed generation time
generation_time_opts(
dist_spec(mean = 3, sd = 2, mean_sd = 1, sd_sd = 0.5, max = 15)
)
#>
#> Uncertain lognormal distribution with (untruncated) logmean 3 (SD 1) and logSD 2 (SD 0.5)
#>
# A generation time sourced from the literature
dist <- get_generation_time(disease = "SARS-CoV-2", source = "ganyani")
generation_time_opts(dist)
#>
#> Uncertain gamma distribution with (untruncated) mean 3.6 (SD 0.71) and SD 3.1 (SD 0.77)
#>