View source: R/model-modules.R
enw_expectation | R Documentation |
Expectation model module
enw_expectation(
r = ~0 + (1 | day:.group),
generation_time = 1,
observation = ~1,
latent_reporting_delay = 1,
data,
...
)
r |
A formula (as implemented in |
generation_time |
A numeric vector that sums to 1 and defaults to 1. Describes the weighting to apply to previous generations (i.e as part of a renewal equation). When set to 1 (the default) this corresponds to modelling the daily growth rate. |
observation |
A formula (as implemented in |
latent_reporting_delay |
A numeric vector that defaults to 1. Describes the weighting to apply to past and current latent expected observations (from most recent to least). This can be used both to convolve based on some assumed reporting delay and to rescale observations (by multiplying a probability mass function by some fraction) to account ascertainment etc. A list of PMFs can be provided to allow for time-varying PMFs. This should be the same length as the modelled time period plus the length of the generation time if supplied. |
data |
Output from |
... |
Additional parameters passed to |
A list containing the supplied formulas, data passed into a list
describing the models, a data.frame
describing the priors used, and a
function that takes the output data and priors and returns a function that
can be used to sample from a tightened version of the prior distribution.
Model modules
enw_fit_opts()
,
enw_missing()
,
enw_obs()
,
enw_reference()
,
enw_report()
enw_expectation(data = enw_example("preprocessed"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.