Updates Forecast Horizon Based on Input Data and Target
Source:R/epinow-internal.R
update_horizon.Rd
Arguments
- horizon
Numeric, defaults to 7. Number of days into the future to forecast.
- target_date
Date, defaults to maximum found in the data if not specified.
- data
A
<data.frame>
of confirmed cases (confirm) by date (date).confirm
must be numeric anddate
must be in date format. Optionally this can also have a logicalaccumulate
column which indicates whether data should be added to the next data point. This is useful when modelling e.g. weekly incidence data. See also thefill_missing()
function which helps add theaccumulate
column with the desired properties when dealing with non-daily data. If any accumulation is done this happens after truncation as specified by thetruncation
argument.