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.
Arguments
- ...
Any parameters to be passed to
dist_spec()
, if the generation time is given as parameters of a distribution rather than adisease
andsource
. In this case if themean
parameter is not set a mean of 1 will be assumed, if themax
parameter not set then themax
will be set to 15 to ensure backwards compatibility, and if nodist
parameter is given then a gamma distribution will be used for backwards compatibility. As fordelay_opts()
a list of parameters can also be supplied that describe a distribution (but unlikedelay_opts()
multiple distributions may not currently be used (for example as output by get_generation_time()).- disease
A character string indicating the disease of interest.
- source
A character string indicating the source of interest.
- max
Integer, defaults to 15. Maximum generation time. This will not be used if a maximum is set in the distribution parameters.
- fixed
Logical, defaults to
FALSE
. Should the generation time be treated as coming from fixed (vs uncertain) distributions.- prior_weight
numeric, weight given to the generation time prior. By default the generation time prior will be weighted by the number of observation data points, usually preventing the posteriors from shifting much from the given distribution. Another sensible option would be 1, i.e. treating the generation time distribution as a single parameter.
Examples
# default settings with a fixed generation time
generation_time_opts()
#> $gt_mean_mean
#> [1] 1
#>
#> $gt_mean_sd
#> [1] 0
#>
#> $gt_sd_mean
#> [1] 0
#>
#> $gt_sd_sd
#> [1] 0
#>
#> $gt_fixed
#> [1] 1
#>
#> $gt_max
#> [1] 1
#>
#> $gt_dist
#> [1] 1
#>
# A fixed gamma distributed generation time
generation_time_opts(mean = 3, sd = 2)
#> $gt_mean_mean
#> [1] 3
#>
#> $gt_mean_sd
#> [1] 0
#>
#> $gt_sd_mean
#> [1] 2
#>
#> $gt_sd_sd
#> [1] 0
#>
#> $gt_fixed
#> [1] 1
#>
#> $gt_max
#> [1] 15
#>
#> $gt_dist
#> [1] 1
#>
# An uncertain gamma distributed generation time
generation_time_opts(mean = 3, sd = 2, mean_sd = 1, sd_sd = 0.5)
#> $gt_mean_mean
#> [1] 3
#>
#> $gt_mean_sd
#> [1] 1
#>
#> $gt_sd_mean
#> [1] 2
#>
#> $gt_sd_sd
#> [1] 0.5
#>
#> $gt_fixed
#> [1] 0
#>
#> $gt_max
#> [1] 15
#>
#> $gt_dist
#> [1] 1
#>