bsts Model Wrapper
bsts_model.Rd
bsts Model Wrapper
Value
A dataframe of predictions (with columns representing the time horizon and rows representing samples).
Examples
if (FALSE) { # \dontrun{
library(bsts)
## Used on its own
bsts_model(
y = EpiSoon::example_obs_rts[1:10, ]$rt,
model = function(ss, y) {
bsts::AddAr(ss, y = y, lags = 2)
},
samples = 10, horizon = 7
)
## Used for forecasting
forecast_rt(EpiSoon::example_obs_rts[1:10, ],
model = function(...) {
EpiSoon::bsts_model(
model =
function(ss, y) {
bsts::AddAr(ss, y = y, lags = 3)
}, ...
)
},
horizon = 7, samples = 10
)
} # }