Fit and Forecast using a Model
forecast_rt.Rd
Fit and Forecast using a Model
Arguments
- rts
A dataframe of containing two variables
rt
anddate
withrt
being numeric anddate
being a date.- 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_rt(EpiSoon::example_obs_rts[1:10, ],
model = function(...) {
EpiSoon::bsts_model(model = function(ss, y) {
bsts::AddAutoAr(ss, y = y, lags = 10)
}, ...)
},
horizon = 7, samples = 10
)
}