The overall premise is that there is a single latent process (modelled as GP or with the renewal equation) that informs multiple observation processes. Each of these can have:
The delays need to be identified in case they are common across different observations, e.g.
We're assuming that delays can be equal but the observations are independent (not e.g. hospitalisation conditional on case report)
This means that the current options specified in delay_opts()
, trunc_opts()
, obs_opts()
, the accumulation
argument in forecast_opts()
are all specific to the particular observation type, except delays that can be shared.
Observations are converted from an array to a ragged array. The main required changes here will be lookups so that observations are correctly associated with different observation models. Some variables e.g. for day of the week effects will have to become 2D arrays.
The observation options mentioned above will have to be combined in a single interface.
The proposed solution is that the current data
, delays
, truncation
and future_accumulation
become folded into a new obs_model()
(based on obs_opts()
and these can be passed as obs
.
estimate_infections(
obs = c(
"Confirmed cases" = obs_model(
data = reported_cases,
delays = incubation_period + reporting_delay,
truncation = trunc_opts(Lognormal(1, 2)),
family = "poisson",
accumulation = 7
),
"Hospital admissions" = obs_model(
data = admissions,
delays = incubation_period + admission_delay,
truncation = trunc_opts(Gamma(1, 1)),
family = "negbin",
weight = 0.5
)
),
generation_time = generation_time_opts(generation_time)
)
This covers the case where only confirmed cases are ever admitted to hospital.
estimate_infections(
## "Confirmed cases" is the default name
obs = obs_model(
data = reported_cases,
delays = incubation_period + reporting_delay,
truncation = trunc_opts(Lognormal(1, 2)),
family = "poisson",
accumulation = 7,
obs = c(
"Hospital admissions" = obs_model(
data = admissions,
delays = admission_delay,
truncation = trunc_opts(Gamma(1, 1)),
family = "negbin",
weight = 0.5
)
)
),
),
generation_time = generation_time_opts(generation_time)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.