Organise data inputs that the model will be fit to. Note that there are other data inputs (notably severity and vaccination data) that are not fit to but are treated as model parameters.
spim_data(
date,
region,
model_type,
rtm,
serology,
trim_deaths,
trim_pillar2,
adm_backfill_date,
ons_death_backfill_date,
trim_pillar2_date = FALSE,
full_data = FALSE
)
The date of the data. This will be the final date
The region that we are fitting to. This will either
be one of the 10 NHS regions (one of
sircovid::regions("all")
), or an argument to that function
(e.g., all
)
Either "BB" (beta-binomial) or "NB" (negative binomial). We use and exclude different data types depending on this argument.
The "RTM collate" data feed. This contains information about deaths, positive test results, react serology, etc. TODO: DESCRIBE FORMAT; TODO: DESCRIBE ORIGIN
The additional serology data. TODO: DESCRIBE FORMAT
The number of days of deaths to trim to avoid back-fill issues. We typically use a value of 4 days.
Either an integer representing the number of days of
pillar 2 data to trim to avoid back-fill issues (typically 7 days) or a
date string representing the date from which we no longer fit to pillar 2.
If the latter, then trim_pillar2_date
must be TRUE
A date string, representing the last date we use admissions by age from the SUS linelist for England NHS regions. After this date we use age-aggregated admissions from the UKHSA dashboard. This is to account for backfill, and should be carefully updated with every new SUS data delivery.
A date string, representing the last date we use deaths by age from the ONS for England NHS regions. After this date we use deaths by age from the UKHSA linelist. This is to account for the increased delay in registering death certificates, compared with just reporting deaths that occur within 28 days of a positive test.
Logical parameter. If TRUE, indicates that
trim_pillar2
should be expected to be a date string. If FALSE,
indicates that should. Default is FALSE
Not sure yet, we'll find out
A data.frame()
TODO: describe columns