forecast.fbl_bsts: Produce forecasts from the bsts model

Description Usage Arguments Value See Also Examples

View source: R/model.R

Description

If additional future information is required (such as exogenous variables) by the model, then they should be included as variables of the new_data argument.

Usage

1
2
## S3 method for class 'fbl_bsts'
forecast(object, new_data, specials = NULL, ...)

Arguments

object

The time series model used to produce the forecasts

new_data

A tsibble containing future information used to forecast.

specials

(passed by fabletools::forecast.mdl_df()).

...

Additional arguments passed to bsts::predict.bsts().

Value

A list of forecasts.

See Also

bsts::predict.bsts()

Examples

1
2
3
4
5
6
7
8
9
if (requireNamespace("tsibbledata")) {
library(tsibble)
library(dplyr)
tsibbledata::aus_production %>%
  model(
    bsts = BSTS(Beer ~ season("year"))
  ) %>%
  forecast()
}

davidtedfordholt/fable.bsts documentation built on Sept. 15, 2020, 11:38 a.m.