Skip to contents

[Stable] Returns generation time parameters in a format for lower level model use.

Usage

generation_time_opts(
  dist = dist_spec(mean = 1),
  ...,
  disease,
  source,
  max = 14,
  fixed = FALSE,
  prior_weight
)

Arguments

dist

A delay distribution or series of delay distributions generated using dist_spec(). 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 of estimate_infections() instead.

Value

A <generation_time_opts> object summarising the input delay distributions.

Author

Sebastian Funk

Sam Abbott

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 = 14))
#> 
#>   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 = 14)
)
#> 
#>   Uncertain lognormal distribution with (untruncated) logmean 3 (SD 1) and logSD 2 (SD 0.5)
#> 

# An example generation time
generation_time_opts(example_generation_time)
#> 
#>   Uncertain gamma distribution with (untruncated) mean 3.6 (SD 0.71) and SD 3.1 (SD 0.77)
#>