The "flat-line" forecaster, which essentially mirrors the baseline in the COVID Forecast Hub. It augments a flat-line point prediction with a forecast distribution around this point based on quantiles of symmetrized week-to-week residuals.

baseline_forecaster(
  df_list,
  forecast_date,
  incidence_period = c("epiweek", "day"),
  ahead = 1:4,
  symmetrize = TRUE
)

Arguments

df_list

list of data of the format that is returned by covidcast::covidcast_signal() or covidcast::covidcast_signals().

forecast_date

Date object or string of the form "YYYY-MM-DD", indicating date on which forecasts will be made about some period (e.g., epiweek). For example, if forecast_date = "2020-05-11", incidence_period = "day", and ahead = 3, then, we'd be making forecasts for "2020-05-14".

incidence_period

String indicating the incidence period, either "epiweek" or "day".

ahead

Vector of (one or more) integers. How many epiweeks/days ahead are you forecasting? If incidence_period = "epiweek" and forecast_date is Sunday or Monday, then ahead = 1 means the epiweek that includes the forecast date; if forecast_date falls on a Tuesday through Saturday, then it is the following epiweek. If incidence_period = "day", then ahead = 1 means the day after forecast date.

symmetrize

Should symmetrized residuals be used, or unsymmetrized (raw) residuals? Default is TRUE, which results in the flat-line point prediction. If FALSE, then point predictions can be increasing or decreasing, depending on the historical trend.

Value

Data frame with columns ahead, geo_value, quantile, value. The quantile column gives the predicted quantiles of the forecast distribution for that location and ahead. An NA indicates a point forecast (same as the median in this case).