This unexported helper is used internally in ts_forecast to generate cumulative forecasts from incident. The function cumulatively sums incident estimates (quantile and point) at each location. Note that if used outside of ts_forecast one must be sure that the ".data" argument matches object used to generate the incident forecast object ("inc_forecast").

ts_cumulative_forecast(.data, outcome = "cdeaths", inc_forecast)

Arguments

.data

Data from which the cumulative forecast should get recent counts; CAUTION for best results make sure that the data passed to this argument is the same object as used to generate the model/forecast that is specified in "inc_forecast"

outcome

Name of the outcome; should be be one of 'cdeaths' or 'ccases'

inc_forecast

A tibble with incident forecast data generated using ts_forecast; should only be incident cases corresponding to outcome for which cumulative count is to be aggregated

Value

A tibble with forecast results, including the name of the model, year and week, value of the forecast estimate, type of estimate (quantile or point), and bin of the quantile (if applicable) for the estimate.