dot-get_delays_over_full_time_units.Rd
The main use of this function is to allow comparison with legacy code.
.get_delays_over_full_time_units( delays, date_of_interest, num_steps_in_a_unit = 7, min_number_cases )
delays | dataframe containing the empirical data. See Details. |
---|---|
date_of_interest | Date. Date for which the most recent recorded delays are sought. |
num_steps_in_a_unit | Optional argument. Number of time steps in a full time unit (e.g. 7 if looking at weeks). If set, the delays used to build a particular delay distribution will span over a round number of such time units. This option is included for comparison with legacy code. |
min_number_cases | integer.
Minimal number of cases to build the empirical distribution from.
If |
A vector of length at least min_number_cases
, containing
records of delays.
An empirical_delays
dataframe must contain (at least) two columns.
An 'event_date' column of type Date
and a 'report_delay' column of type numeric
.
Each row represents the recording of a single delay between event and observation.
Typically, the 'event' here is the onset of symptoms of the disease of interest.
And the observation can be, for instance, case confirmation, hospital admission,
admission to an ICU, or death, depending on what the incidence data represents.
For a particular row, 'event_date' would then represent, for a single individual,
the date at which symptoms appeared. And 'report_delay' would represent the number
of time steps (as specified by time_step
) until the observation was made
for this same individual.