Forecasts Cases Directly
forecast_cases_directly.Rd
Forecasts Cases Directly
Usage
forecast_cases_directly(
cases = NULL,
model,
horizon = 7,
samples = 1000,
bound_rt = TRUE,
timeout = 100
)
Arguments
- cases
A dataframe containing
date
andcases
variables- model
A model object in the format of
bsts_model
orfable_model
. See the corresponding help files for details.- horizon
Numeric, the time horizon over which to predict.
- samples
Numeric, number of samples to take.
- bound_rt
Logical, defaults to
TRUE
. Should Rt values be bounded to be greater than or equal to 0.- timeout
Numeric, timeout of model fitting in seconds. Defaults to 30 seconds.
Examples
if (FALSE) {
forecast_cases_directly(EpiSoon::example_obs_cases,
model = function(...) {
EpiSoon::bsts_model(model = function(ss, y) {
bsts::AddAutoAr(ss, y = y, lags = 10)
}, ...)
},
horizon = 7, samples = 10
)
}