View source: R/flatline_forecaster.R
flatline_forecaster | R Documentation |
This is a simple forecasting model for epiprocess::epi_df data. It uses the most recent observation as the forecast for any future date, and produces intervals based on the quantiles of the residuals of such a "flatline" forecast over all available training data.
flatline_forecaster(epi_data, outcome, args_list = flatline_args_list())
epi_data |
An epiprocess::epi_df |
outcome |
A scalar character for the column name we wish to predict. |
args_list |
A list of dditional arguments as created by the
|
By default, the predictive intervals are computed separately for each
combination of key values (geo_value
+ any additional keys) in the
epi_data
argument.
This forecaster is very similar to that used by the COVID19ForecastHub
A data frame of point (and optionally interval) forecasts at a single
ahead (unique horizon) for each unique combination of key_vars
.
jhu <- covid_case_death_rates %>%
dplyr::filter(time_value >= as.Date("2021-12-01"))
out <- flatline_forecaster(jhu, "death_rate")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.