Learn R Programming

EpiNow2 (version 1.3.4)

delay_opts: Delay Distribution Options

Description

[Stable] Returns delay distributions formatted for usage by downstream functions.

Usage

delay_opts(..., fixed = FALSE)

Value

A list summarising the input delay distributions.

Arguments

...

A list of lists specifying distributions of reporting delays. Each list is passed to dist_spec() and so should contain parameters linked to the functions arguments. If a list is not given then it is assumed that no delay is present. If multiple lists are given then they are assumed to be independent.

fixed

Logical, defaults to FALSE. Should all reporting delays be treated as coming from fixed (vs uncertain) distributions. Making this simplification drastically reduces compute requirements. Setting this here overrides any of the constituent delay distributions being set to be fixed or not.

Author

Sam Abbott

Sebastian Funk

See Also

convert_to_logmean convert_to_logsd bootstrapped_dist_fit dist_spec

Examples

Run this code
# no delays
delay_opts()

# A single delay that has uncertainty
delay <- list(mean = 1, mean_sd = 0.2, sd = 0.5, sd_sd = 0.1, max = 15)
delay_opts(delay)

# A single delay where we override the uncertainty assumption
delay_opts(delay, fixed = TRUE)

# A delay where uncertainty is implict
delay_opts(list(mean = 1, mean_sd = 0, sd = 0.5, sd_sd = 0, max = 15))

# Multiple delays
delay_opts(delay, delay)

Run the code above in your browser using DataLab